Title: http: fix no_proxy leading-dot suffix matching by watilde · Pull Request #62333 · nodejs/node · GitHub
Open Graph Title: http: fix no_proxy leading-dot suffix matching by watilde · Pull Request #62333 · nodejs/node
X Title: http: fix no_proxy leading-dot suffix matching by watilde · Pull Request #62333 · nodejs/node
Description: Fix NO_PROXY suffix matching to prevent partial domain matches This PR improves NO_PROXY logic by ensuring suffix matches occur only on exact domains or subdomains. Previously, using endsWith() caused false positives (e.g., myexample.com matching .example.com). This aligns with the expected domain boundary matching behavior. // Run with: ./node --expose-internals -e "$(cat this_file.js)" 'use strict'; const { parseProxyConfigFromEnv } = require('internal/http'); const assert = require('assert'); const config = parseProxyConfigFromEnv({ http_proxy: 'http://proxy.test:8080', no_proxy: '.example.com', }, 'http:', false); // These should bypass proxy (false) assert.strictEqual(config.shouldUseProxy('sub.example.com'), false); assert.strictEqual(config.shouldUseProxy('example.com'), false); // These should use proxy (true) — currently returns false without the fix assert.strictEqual(config.shouldUseProxy('notexample.com'), true); assert.strictEqual(config.shouldUseProxy('badexample.com'), true); console.log('All assertions passed');
Open Graph Description: Fix NO_PROXY suffix matching to prevent partial domain matches This PR improves NO_PROXY logic by ensuring suffix matches occur only on exact domains or subdomains. Previously, using endsWith() cau...
X Description: Fix NO_PROXY suffix matching to prevent partial domain matches This PR improves NO_PROXY logic by ensuring suffix matches occur only on exact domains or subdomains. Previously, using endsWith() cau...
Opengraph URL: https://github.com/nodejs/node/pull/62333
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b1f6b68c-5393-82c1-ea73-ca93d0b0a181 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C2B8:29330:E98C84:EED25F:6A4DC402 |
| html-safe-nonce | 62b7a78b7782b9138ddedf11831467fee8a6ff275b360ef778ea58b1b460ab66 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkI4OjI5MzMwOkU5OEM4NDpFRUQyNUY6NkE0REM0MDIiLCJ2aXNpdG9yX2lkIjoiMzk5ODQ3NjA0NTk1OTE1MjY0MiIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | cb05273850ba892cfc9bc0fcfea3b54af16c14c84d8f7c2c7895eb9260e58f28 |
| hovercard-subject-tag | pull_request:3418490101 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodejs/node/pull/62333/files |
| twitter:image | https://avatars.githubusercontent.com/u/1716463?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1716463?s=400&v=4 |
| og:image:alt | Fix NO_PROXY suffix matching to prevent partial domain matches This PR improves NO_PROXY logic by ensuring suffix matches occur only on exact domains or subdomains. Previously, using endsWith() cau... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width