Merge pull request #3786 from Shopify/rewrite-x-forwarded-prefix
Fix x-forwarded-prefix annotation
This commit is contained in:
commit
b87cc5a1a6
8 changed files with 121 additions and 22 deletions
|
|
@ -503,8 +503,8 @@ func buildProxyPass(host string, b interface{}, loc interface{}) string {
|
|||
if len(location.Rewrite.Target) > 0 {
|
||||
var xForwardedPrefix string
|
||||
|
||||
if location.XForwardedPrefix {
|
||||
xForwardedPrefix = fmt.Sprintf("proxy_set_header X-Forwarded-Prefix \"%s\";\n", path)
|
||||
if len(location.XForwardedPrefix) > 0 {
|
||||
xForwardedPrefix = fmt.Sprintf("proxy_set_header X-Forwarded-Prefix \"%s\";\n", location.XForwardedPrefix)
|
||||
}
|
||||
|
||||
return fmt.Sprintf(`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue