| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3b3b71e commit 1ddaab1
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1716,6 +1716,16 @@ and incorrect handling of usernames and passwords. Do not use with untrusted | |||
| 1716 | 1716 | input. CVEs are not issued for `url.parse()` vulnerabilities. Use the | |
| 1717 | 1717 | [WHATWG URL][] API instead. | |
| 1718 | 1718 | ||
| 1719 | + The example above assumes well-formed headers are forwarded from a reverse | ||
| 1720 | + proxy to your Node.js server. If you are not using a reverse proxy, you should | ||
| 1721 | + use the example below: | ||
| 1722 | + | ||
| 1723 | + ```js | ||
| 1724 | + function getURL(req) { | ||
| 1725 | + return new URL(req.url || '/', 'https://example.com'); | ||
| 1726 | + } | ||
| 1727 | + ``` | ||
| 1728 | + | ||
| 1719 | 1729 | ### `url.resolve(from, to)` | |
| 1720 | 1730 | ||
| 1721 | 1731 | <!-- YAML | |
| Back | FazBrowse Home | New Git URL |
0 commit comments