+
Skip to content

fix: correcting to use the X-Forwarded-Proto header #40905

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

Merged
merged 1 commit into from
Jul 7, 2025

Conversation

shawkins
Copy link
Contributor

@shawkins shawkins commented Jul 3, 2025

It should suffice to just check for X-Forwarded-Proto

close: #40903

close: keycloak#40903

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
@shawkins shawkins requested a review from a team as a code owner July 3, 2025 18:31
@sschu
Copy link
Contributor

sschu commented Jul 4, 2025

@shawkins Why are you using the X-Forwarded-Proto header here to detect if a forwarded header is in place? I would have said X-Forwarded-For is the primary header and X-Forwarded-Proto might not even be set. Or am I missing something here?

@shawkins
Copy link
Contributor Author

shawkins commented Jul 4, 2025

Since this is the secure context check, either the Forwarded or X-Forwarded-Proto header will need to be set to change the protocol from http to https. This message is hopefully just a pointer to what could be wrong. hostname-debug or the startup log should contain a more detailed description.

@sschu
Copy link
Contributor

sschu commented Jul 7, 2025

@shawkins Ah, I havent seen the context of this, sorry for the noise!

Copy link
Contributor

@vmuzikar vmuzikar left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@vmuzikar vmuzikar merged commit 193ab47 into keycloak:main Jul 7, 2025
76 checks passed
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.

Proxy detection needs tweaked for insecure context warning
3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载