fix: missing CORS headers when auth fails (#9251)
This commit is contained in:
parent
785458cceb
commit
3aa53aaf5b
2 changed files with 32 additions and 4 deletions
|
|
@ -1268,6 +1268,10 @@ stream {
|
|||
deny all;
|
||||
{{ end }}
|
||||
|
||||
{{ if $location.CorsConfig.CorsEnabled }}
|
||||
{{ template "CORS" $location }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not (isLocationInLocationList $location $all.Cfg.NoAuthLocations) }}
|
||||
{{ if $authPath }}
|
||||
# this location requires authentication
|
||||
|
|
@ -1329,10 +1333,6 @@ stream {
|
|||
{{ range $limit := $limits }}
|
||||
{{ $limit }}{{ end }}
|
||||
|
||||
{{ if $location.CorsConfig.CorsEnabled }}
|
||||
{{ template "CORS" $location }}
|
||||
{{ end }}
|
||||
|
||||
{{ buildInfluxDB $location.InfluxDB }}
|
||||
|
||||
{{ if isValidByteSize $location.Proxy.BodySize true }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue