Use a named location for authSignURL (#4859)
This commit is contained in:
parent
d83b83bc0d
commit
a0523c3c8a
6 changed files with 126 additions and 22 deletions
|
|
@ -952,6 +952,14 @@ stream {
|
|||
{{ end }}
|
||||
|
||||
|
||||
{{ if $externalAuth.SigninURL }}
|
||||
location {{ buildAuthSignURLLocation $location.Path $externalAuth.SigninURL }} {
|
||||
internal;
|
||||
|
||||
return 302 {{ buildAuthSignURL $externalAuth.SigninURL }};
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
location {{ $path }} {
|
||||
{{ $ing := (getIngressInformation $location.Ingress $server.Hostname $location.Path) }}
|
||||
set $namespace {{ $ing.Namespace | quote}};
|
||||
|
|
@ -1071,7 +1079,7 @@ stream {
|
|||
|
||||
{{ if $externalAuth.SigninURL }}
|
||||
set_escape_uri $escaped_request_uri $request_uri;
|
||||
error_page 401 = {{ buildAuthSignURL $externalAuth.SigninURL }};
|
||||
error_page 401 = {{ buildAuthSignURLLocation $location.Path $externalAuth.SigninURL }};
|
||||
{{ end }}
|
||||
|
||||
{{ if $location.BasicDigestAuth.Secured }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue