fix undefined variable $auth_cookie error when location is denied

(add) isLocationAllowed check before setting the cookie
This commit is contained in:
Jeff Hui 2020-06-08 11:18:53 -04:00
parent 99aad291a5
commit 7767230e6a
2 changed files with 31 additions and 3 deletions

View file

@ -1018,7 +1018,7 @@ stream {
}
{{ end }}
{{ if isLocationAllowed $location }}
{{ if $externalAuth.SigninURL }}
location {{ buildAuthSignURLLocation $location.Path $externalAuth.SigninURL }} {
internal;
@ -1028,6 +1028,7 @@ stream {
return 302 {{ buildAuthSignURL $externalAuth.SigninURL }};
}
{{ end }}
{{ end }}
location {{ $path }} {
{{ $ing := (getIngressInformation $location.Ingress $server.Hostname $location.Path) }}