adding in some proxyification adjustments#13
Open
nshttpd wants to merge 4 commits intokellegous:masterfrom
nshttpd:nshttpd/x-forwarded-proto-header
Open
adding in some proxyification adjustments#13nshttpd wants to merge 4 commits intokellegous:masterfrom nshttpd:nshttpd/x-forwarded-proto-header
nshttpd wants to merge 4 commits intokellegous:masterfrom
nshttpd:nshttpd/x-forwarded-proto-header
Conversation
added 2 commits
June 11, 2017 16:40
one there. in case underpants is part of a request chain.
dragonsinth
reviewed
Jun 14, 2017
underpants.go
Outdated
| // user. | ||
| AllowedGroups []string `json:"allowed-groups"` | ||
|
|
||
| // Fix the host header on the requst to the backend proxied service to match |
There was a problem hiding this comment.
s/requst/request (found by @jhump)
dragonsinth
reviewed
Jun 29, 2017
underpants.go
Outdated
| proto = "https" | ||
| } | ||
|
|
||
| if r.Header.Get("X-Forwarded-Proto") != "" { |
There was a problem hiding this comment.
this is backwards, should be == ""
kellegous
reviewed
Jun 30, 2017
underpants.go
Outdated
| // setup routes | ||
| oc := oauthConfig(c, port) | ||
| for _, r := range c.Routes { | ||
| fmt.Printf("setting up for host : %s\n", r.From) |
Owner
There was a problem hiding this comment.
We probably don't need these debugging Printlns, right?
underpants.go
Outdated
|
|
||
| // Fix the host header on the request to the backend proxied service to match | ||
| // what came in through the front door. | ||
| FixHost bool |
Owner
There was a problem hiding this comment.
I think the property here should be a little more descriptive. How about pass-through-host-header or retain-host-header. Also be sure to add this directive to one of the sample json files.
Author
There was a problem hiding this comment.
I like retain host header .. updating now.
README explaining what the host flag is for.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some services cough jenkins cough build redirects based on the Host: header sent in the request. If the 'to' definition is an externally not resolvable hostname then these 302's break usage. So if the Host: header needs to be the same all the way through, set the value to
trueand the resulting backend request will have the Host header set.