Skip to content

[Bug]: Import from CDN fails when behind corporate proxy #8474

@humberto-garciacaballero

Description

Kind of Issue

Runtime - command-line tools

Tool or Library

cspell

Version

9.4.0

Supporting Library

No response

OS

macOS

OS Version

No response

Description

When trying to import dictionaries from CDN as described in the cspell documentation, cspell fails to load them if the machine is connected through a corporate proxy.

Here as screenshot showing the problem:

Image

When running cspell with the configuration that can be seen above (i.e., two imported dictionaries), it results in an error trying to read the config files. However, if I try to curl the same resource, the request resolves correctly. Important to notice that I have configured the proxy URL through the env variables http_proxy and https_proxy. If I do not configure the proxy in this way, the curl request will fail too.

An alternative would be to install the dictionaries locally using NPM, but I am trying to keep the setup of my project as simple as possible so not needing NPM would be preferable.

Steps to Reproduce

  1. Make sure you are behind a proxy
  2. Copy the content to the cspell.json file.
  3. Run the following command: cspell --config cspell.json

Expected Behavior

If a proxy has been configured in the system, the import from the CDN should go through as for curl, that is, by reusing the http_proxy and https_proxy env variables.

Additional Information

No response

cspell.json

{
    "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
    "version": "0.2",
    "files": [
        "**/*.md"
    ],
    "language": "en",
    "dictionaries": [
        "medical terms"
    ],
    "import": [
        "https://cdn.jsdelivr.net/npm/@cspell/dict-medicalterms/cspell-ext.json"
    ]
}

cspell.config.yaml

Example Repository

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions