Skip to content

Conversation

@whois-jon-peterson
Copy link

What does this PR do?

Adds a check before proxying a request to fetch JSONSchema content, to ensure the request URI does not match the domains specified in the http.noProxy setting.

What issues does this PR fix or reference?

Related to the error described in #694, but not necessarily a complete fix for all circumstances reported by participants.

Is it tested? How?

Added unit tests for the new helper method.

Tested e2e by building and installing from source on a machine behind a ZScaler proxy, then confirming schemas hosted at URLs matching my NO_PROXY environment variable were no longer failing to load. Schemas hosted at proxied URLs also continue to load.

@whois-jon-peterson
Copy link
Author

Is there anything that I can do to help get this merged?

@datho7561 datho7561 self-requested a review December 10, 2025 14:40
@datho7561 datho7561 moved this to Pending review in Java Tooling Dec 10, 2025
const noProxyEntries = noProxy.map((item) => item.trim());
const uriAuthority = Uri.parse(uri).authority;
return !noProxyEntries.some((entry) => {
if (entry.startsWith('*.')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The *. feature doesn't seem to be working for me unfortunately.

I have (note that there isn't actually a proxy):

{
  "http.proxy": "http://localhost:5736",
  "http.noProxy": [
    "*.github.io"
  ],
}

And I have:

# yaml-language-server: $schema=https://squidfunk.github.io/mkdocs-material/schema.json
site_name: My Docs
site_url: https://example.com
theme:
  name: material

and it says it can't load the schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending review

Development

Successfully merging this pull request may close these issues.

2 participants