Moved X-Auth-Request-Redirect back into correct location block for oauth2_proxy
This commit is contained in:
parent
e34afc0fa4
commit
c2fc3f06eb
2 changed files with 9 additions and 8 deletions
File diff suppressed because one or more lines are too long
|
@ -671,12 +671,6 @@ stream {
|
||||||
proxy_set_header X-Original-Method $request_method;
|
proxy_set_header X-Original-Method $request_method;
|
||||||
proxy_set_header X-Sent-From "nginx-ingress-controller";
|
proxy_set_header X-Sent-From "nginx-ingress-controller";
|
||||||
|
|
||||||
{{ if $location.ExternalAuth.RequestRedirect }}
|
|
||||||
proxy_set_header X-Auth-Request-Redirect {{ $location.ExternalAuth.RequestRedirect }};
|
|
||||||
{{ else }}
|
|
||||||
proxy_set_header X-Auth-Request-Redirect $request_uri;
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_ssl_server_name on;
|
proxy_ssl_server_name on;
|
||||||
proxy_pass_request_headers on;
|
proxy_pass_request_headers on;
|
||||||
|
@ -745,6 +739,13 @@ stream {
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{/* This header is used for external authentication */}}
|
||||||
|
{{ if $location.ExternalAuth.RequestRedirect }}
|
||||||
|
proxy_set_header X-Auth-Request-Redirect {{ $location.ExternalAuth.RequestRedirect }};
|
||||||
|
{{ else }}
|
||||||
|
proxy_set_header X-Auth-Request-Redirect $request_uri;
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if $location.ExternalAuth.SigninURL }}
|
{{ if $location.ExternalAuth.SigninURL }}
|
||||||
error_page 401 = {{ buildAuthSignURL $location.ExternalAuth.SigninURL }};
|
error_page 401 = {{ buildAuthSignURL $location.ExternalAuth.SigninURL }};
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue