Skip to content

Conversation

@bltavares
Copy link

Traefik sends a forward auth request for every request, including HEAD methods, in order to validate if a request can continue.

Due to Go HTTP client being strict to the HTTP SPEC, the response of a HEAD does not include a body, while Traefik expects a validation response to be embedded, causing errors.

To mitigate this, when a X-Forwarded-Method is set as HEAD, we'll avoid modifying the HTTP Method response in order to send a body back, allowing head requests to by validated.

This is necessary even if an allow rule is set, otherwhise it will fail as well.

Mitagates: #156

Traefik sends a forward auth request for every request, including HEAD methods, in order to validate if a request can continue.

Due to Go HTTP client being strict to the HTTP SPEC, the response of a HEAD does not include a body, while Traefik expects a validation response to be embedded, causing errors.

To mitigate this, when a X-Forwarded-Method is set as HEAD, we'll avoid modifying the HTTP Method response in order to send a body back, allowing head requests to by validated.

This is necessary even if an allow rule is set, otherwhise it will fail as well.

Mitagates:  thomseddon#156
@rsch136
Copy link

rsch136 commented Sep 21, 2024

Hi! I am facing exactly the problem described in #156. Does anything speak against merging this PR?

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