This commit is contained in:
Luke Jolly 2018-03-08 21:05:20 +00:00 committed by GitHub
commit f14a2bb3d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

File diff suppressed because one or more lines are too long

View file

@ -674,12 +674,6 @@ stream {
proxy_set_header X-Original-Method $request_method;
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_ssl_server_name on;
proxy_pass_request_headers on;
@ -759,6 +753,13 @@ stream {
{{- 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 }}
error_page 401 = {{ buildAuthSignURL $location.ExternalAuth.SigninURL }};
{{ end }}