-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Put Host into a header for Forward Auth #2121
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use the common header X-Forwarded-Host
as default header value.
types/types.go
Outdated
TLS *ClientTLS `description:"Enable TLS support"` | ||
Address string `description:"Authentication server address"` | ||
TLS *ClientTLS `description:"Enable TLS support"` | ||
ForwardHostname *ForwardHostname `description:"Enable forward hostname request "` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can simplify like that:
// Forward authentication
type Forward struct {
Address string `description:"Authentication server address"`
TLS *ClientTLS `description:"Enable TLS support"`
HostHeader string `description:"Header name to put the forwarded host"`
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
@ekozan After discussion with the team, we believe that this PR should go in version 1.4. Can you change the root branch of PR and rebase on branch 1.4 ? |
After the rebase you will need to add some documentation https://github.com/containous/traefik/blob/v1.4/docs/configuration/entrypoints.md#forward-authentication |
4a0266f
to
0263bc1
Compare
0263bc1
to
316b127
Compare
done. :) |
could you add some documentation https://github.com/containous/traefik/blob/v1.4/docs/configuration/entrypoints.md#forward-authentication |
Done, I'm not really good for write doc :P |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
LGTM
be0fa87
to
a7395ee
Compare
I think to another way, more conventional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏
Hey @ekozan, |
:) okay |
Hello guys, anyone can help with using [entryPoints.http.auth.forward] in [entryPoints.https] ? |
Hi all,
I just added possibility of forward the origin host to the as
Config example
It's follow the design
Related to #2105