GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: mention reverse proxy and include simple example · nodejs/node@1ddaab1

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • url.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/url.md‎

Copy file name to clipboardExpand all lines: doc/api/url.md
+10Lines changed: 10 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1716,6 +1716,16 @@ and incorrect handling of usernames and passwords. Do not use with untrusted
17161716
input. CVEs are not issued for `url.parse()` vulnerabilities. Use the
17171717
[WHATWG URL][] API instead.
17181718

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+
17191729
### `url.resolve(from, to)`
17201730

17211731
<!-- YAML

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.