Skip to content

Commit 28366dc

Browse files
Fixed if block in template
1 parent d8fe62f commit 28366dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rootfs/etc/nginx/template/nginx.tmpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -933,9 +933,9 @@ stream {
933933
{{ $authPath := buildAuthLocation $location $all.Cfg.GlobalExternalAuth.URL }}
934934
{{ $applyGlobalAuth := shouldApplyGlobalAuth $location $all.Cfg.GlobalExternalAuth.URL }}
935935

936-
{{ $externalAuth := $all.Cfg.GlobalExternalAuth}}
937-
{{ if not ($applyGlobalAuth) }}
938-
{{ $externalAuth := $location.ExternalAuth}}
936+
{{ $externalAuth := $location.ExternalAuth }}
937+
{{ if eq $applyGlobalAuth true }}
938+
{{ $externalAuth = $all.Cfg.GlobalExternalAuth }}
939939
{{ end }}
940940

941941
{{ if not (empty $location.Rewrite.AppRoot)}}

0 commit comments

Comments
 (0)