Add CORS template check inside location for externalAuth.SignURL (#8814)

* Add CORS template check inside location for externalAuth.SignURL

* Add testcase for CORS header for auth-signin redirect with CORS enabled.
This commit is contained in:
Harpreet singh 2023-01-19 22:58:36 +08:00 committed by James Strong
parent 87a9f1e007
commit 82720c8e1d
Failed to extract signature
2 changed files with 49 additions and 0 deletions

View file

@ -1180,6 +1180,10 @@ stream {
add_header Set-Cookie $auth_cookie;
{{ if $location.CorsConfig.CorsEnabled }}
{{ template "CORS" $location }}
{{ end }}
# Ensure that modsecurity will not run on an internal location as this is not accessible from outside
{{ if $all.Cfg.EnableModsecurity }}
modsecurity off;