disable basic authentication for HTTP OPTIONS for CORS

This commit is contained in:
Raphael Parree 2018-10-17 13:12:01 +02:00
parent e80fc0b304
commit e5927868b6

View file

@ -285,8 +285,10 @@ server {
{{ end }}
{{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }}
limit_except OPTIONS {
auth_basic "Restricted {{ $host }}";
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }};
}
{{ end }}
{{ if (exists (printf "/etc/nginx/vhost.d/%s_location" $host)) }}
include {{ printf "/etc/nginx/vhost.d/%s_location" $host}};