Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPrometheus adds default http port to the Host header when querying targets. #2226
Comments
This comment has been minimized.
This comment has been minimized.
|
If both are valid, that is not something we are likely to change. First, we tend to err on the side of explicitness and secondly, other people might already rely on the way it is now and changing it would break them, which we cannot do within 1.x |
This comment has been minimized.
This comment has been minimized.
|
My reading of the spec is that the server (HAProxy) must expect both forms.
I ran into the same and modified the HAProxy config in the same way.
I believe Prometheus' behavior is correct and should not change; I'm happy
my HAProxy configuration is a little less buggy now.
…On Mon, Nov 28, 2016, 08:02 Fabian Reinartz ***@***.***> wrote:
If both are valid, that is not something we are likely to change. First,
we tend to err on the side of explicitness and secondly, other people might
already rely on the way it is now and changing it would break them, which
we cannot do within 1.x
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2226 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAICBqiuyIcj_sNgRrtBsbX7MoRE69VLks5rCnyZgaJpZM4K9cku>
.
|
grobie
closed this
Mar 5, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
lock
bot
locked and limited conversation to collaborators
Mar 23, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
ddewaele commentedNov 28, 2016
What did you do?
Added a static config to monitor a webapp exposing a prometheus endpoint
What did you expect to see?
The target is sitting behind a reverse proxy (haProxy) and we cannot access the target directly.
haProxy expected to see a
Hostheader like this :What did you see instead? Under which circumstances?
But instead saw was this :
Although this does not violate the http spec, the spec does allow for default http ports (80 / 443) to be stripped from the Host header. (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23).
We needed to modify our haProxy configuration so that it properly matched incoming http requests from prometheus.