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

[Misc]: X-Forwarded-For header #1579

Closed
jonaro00 opened this issue Jan 25, 2024 · 5 comments
Closed

[Misc]: X-Forwarded-For header #1579

jonaro00 opened this issue Jan 25, 2024 · 5 comments
Labels
Feature Poll Upvote this issue if you want to see this feature in Shuttle S-Accepted This will be worked on

Comments

@jonaro00
Copy link
Member

jonaro00 commented Jan 25, 2024

X-Forwarded-For header enables getting the remote IP in proxied HTTP requests.

There might be even more proxy headers that are relevant to set, such as X-Forwarded-Proto https://discord.com/channels/803236282088161321/1178078233544097862


This issue is a part of the Product Feature Poll (all issues). React with 👍 if you want this feature. Comment if you have suggestions related to this feature.

@jonaro00 jonaro00 added S-Accepted This will be worked on Feature Poll Upvote this issue if you want to see this feature in Shuttle labels Jan 25, 2024
@sourabpramanik
Copy link
Contributor

What has to be done exactly on this? Sorry but I did not fully understand reading the Discord chats

@jonaro00
Copy link
Member Author

jonaro00 commented Apr 8, 2024

The Shuttle team will work on this in due time after upcoming changes to the proxy.

@oscartbeaumont
Copy link

I think this is fixed?

Shuttle calls hyper_reverse_proxy::ReverseProxy::call here which internally handles adding the X-Forwarded-For if it doesn't exist here. The first argument to the call method is the client's IP to use for this.

I don't think it sets X-Forwarded-Proto so maybe that is why this issue is still open?

@oddgrd
Copy link
Contributor

oddgrd commented Sep 27, 2024

I think this is fixed?

Shuttle calls hyper_reverse_proxy::ReverseProxy::call here which internally handles adding the X-Forwarded-For if it doesn't exist here. The first argument to the call method is the client's IP to use for this.

I don't think it sets X-Forwarded-Proto so maybe that is why this issue is still open?

Unfortunately, we did not find a solution on the current platform. The proxy is behind an AWS NLB, which can forward the client IP by preserving it (a connection from the NLB will have the IP of the original client), it can't set headers. Then, the traffic hits a Docker swarm load balancer before it hits the proxy, which changes the IP (which was the client IP up to this point) of the connection made to the proxy to the IP of the load balancer.

However, we are working on a new version of the platform, that is due to be opened in the next few weeks. On the new version, we are no longer using Docker swarm, and the new proxy is built with Pingora. There, the X-Forwarded-For header is already supported, and we intend to add more proxy headers as well. If you want to test the new platform before it is more widely announced, reach out to us on Discord, and we can get you set up with access!

@jonaro00 jonaro00 added the S-Coming Soon This feature will be in an upcoming platform upgrade label Sep 27, 2024
@jonaro00
Copy link
Member Author

X-Forwarded-For is supported on shuttle.dev

@jonaro00 jonaro00 removed the S-Coming Soon This feature will be in an upcoming platform upgrade label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Poll Upvote this issue if you want to see this feature in Shuttle S-Accepted This will be worked on
Projects
None yet
Development

No branches or pull requests

4 participants