Skip to content

Querier: Unset Host Header if DownstreamUrl is configured #2880

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 3 commits into from
Jul 15, 2020

Conversation

tonobo
Copy link
Contributor

@tonobo tonobo commented Jul 15, 2020

What this PR does:

This change is necessary to correctly pass the Host Header to backend
service. The Host Header will be set by stdlib, so flushing them should
do the trick.

Which issue(s) this PR fixes:
Fixes #2875

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
This change is necessary to correctly pass the Host Header to backend
service. The Host Header will be set by stdlib, so flushing them should
do the trick.

Signed-off-by: Tim Foerster <tim.foerster@hetzner.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM! ❤️

Hope you don't mind I've pushed a unit test for it.

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Copy link
Contributor

@pstibrany pstibrany 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 for the contribution!

@tonobo
Copy link
Contributor Author

tonobo commented Jul 15, 2020

Cool! Thanks!

@pracucci pracucci merged commit bf3cbdc into cortexproject:master Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants