Skip to content

config: make isCrossHostRedirect sticky across the redirect chain#920

Merged
roidelapluie merged 1 commit into
prometheus:mainfrom
roidelapluie:roidelapluie/cross-host-sticky
Jun 11, 2026
Merged

config: make isCrossHostRedirect sticky across the redirect chain#920
roidelapluie merged 1 commit into
prometheus:mainfrom
roidelapluie:roidelapluie/cross-host-sticky

Conversation

@roidelapluie

Copy link
Copy Markdown
Member

Walk every hop in the redirect chain rather than only checking the current request's host. Once any hop leaves the original host, the function returns true for all subsequent requests in that chain, even if a later hop redirects back to the original host.

This mirrors net/http's own behaviour and closes the bypass window where a cross→original→cross chain could slip credentials through.

Walk every hop in the redirect chain rather than only checking the
current request's host. Once any hop leaves the original host, the
function returns true for all subsequent requests in that chain, even
if a later hop redirects back to the original host.

This mirrors net/http's own behaviour and closes the bypass window
where a cross→original→cross chain could slip credentials through.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
@roidelapluie roidelapluie requested review from SuperQ and bwplotka June 11, 2026 12:27
@roidelapluie roidelapluie merged commit 0fcda47 into prometheus:main Jun 11, 2026
8 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.

2 participants