Skip to content

Commit

Permalink
Pass along X-Forwarded-* headers (aeharding#205)
Browse files Browse the repository at this point in the history
These headers help the origin web server identify the original IP that the request came from.

See: https://github.com/http-party/node-http-proxy#options
  • Loading branch information
geneccx authored Jul 3, 2023
1 parent 4e3a38d commit 1208f81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ app.use(
router: (req) => `https://${req.params.actor}`,
changeOrigin: true,
secure: true,
xfwd: true,
pathRewrite: (path) => path.split("/").slice(3).join("/"),
onProxyReq: (clientReq, req) => {
clientReq.setHeader(
Expand Down

0 comments on commit 1208f81

Please sign in to comment.