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

Fix issue #2694 #2702

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

debug-ing
Copy link

Fix Fix issue #2694 and add "Forwarded"

Copy link
Contributor

@aldas aldas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are missing.

Are you sure that this implementation is correct? I am looking at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded#using_the_forwarded_header and the header values are quite complex Forwarded: by=<identifier>;for=<identifier>;host=<host>;proto=<http|https> Where is that proto part parsing is done?

@aldas
Copy link
Contributor

aldas commented Nov 22, 2024

This seems so complex that it is maybe worth being separate middleware. Because if you change Context.Scheme method maybe you should change Context.RealIP also?

@debug-ing
Copy link
Author

That's right, I'll try to fix this problem and make another commit, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants