Add proxy-add-original-uri-header config flag

This makes it configurable if a location adds an X-Original-Uri header to the backend request. Default is "true", the current behaviour.
This commit is contained in:
Bastian Hofmann 2018-04-16 12:03:06 +02:00
parent 8855460817
commit 1c17962ba0
5 changed files with 31 additions and 17 deletions

View file

@ -1009,7 +1009,9 @@ stream {
proxy_set_header X-Forwarded-Host $best_http_host;
proxy_set_header X-Forwarded-Port $pass_port;
proxy_set_header X-Forwarded-Proto $pass_access_scheme;
{{ if $all.Cfg.ProxyAddOriginalUriHeader }}
proxy_set_header X-Original-URI $request_uri;
{{ end }}
proxy_set_header X-Scheme $pass_access_scheme;
# Pass the original X-Forwarded-For