Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added number of hops to function example for "behind-proxies" page #1434

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from

Conversation

marcesengel
Copy link

@marcesengel marcesengel commented Aug 2, 2023

proxy-addr not only passes the ip but also the index of the hop to the callback. This could be noted in the documentation, as it's useful for private servers behind a public load balancer which, in theory, is accessible to the public internet but should be proxied by a CDN. In this example the first hop can always be trusted (LoadBalancer -> API) but the second hop would depend on the IP of the incoming request (either CDN -> LB or internet -> LB).

I'm aware that in general network access to the LoadBalancer should be restricted for these cases, however that might not always be feasible short-term + proxy-addr supports this so it might as well be mentioned in the examples 👍

`proxy-addr` not only passes the ip but also the index of the hop to the callback. This could be noted in the documentation, as it's useful for private servers behind a public load balancer which, in theory, is accessible to the public internet but should be proxied by a CDN.
In this example the first hop can always be trusted (LoadBalancer -> API) but the second hop would depend on the IP of the incoming request (either CDN -> LB or internet -> LB).
@crandmck crandmck added the needs tech review A doc edit that requires technical review before merging label Mar 6, 2024
Copy link

netlify bot commented Dec 12, 2024

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 5154b98
🔍 Latest deploy log https://app.netlify.com/sites/expressjscom-preview/deploys/675b6055af56f4000844b310
😎 Deploy Preview https://deploy-preview-1434--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs tech review A doc edit that requires technical review before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants