Commit a9bb5336 by Clinton Blackburn

Corrected regex for credentials CORS

LEARNER-568
parent 54dbb8e0
......@@ -17,7 +17,7 @@ upstream credentials_app_server {
map $http_origin $cors_header {
default "";
'~*^https?://({{ CREDENTIALS_CORS_ORIGIN_WHITELIST|join('|')|replace('.', '\.') }})$' "$http_origin";
'~*^https?://({{ CREDENTIALS_CORS_ORIGIN_WHITELIST|join('|')|replace('.', '\.') }})' "$http_origin";
}
server {
......@@ -44,7 +44,7 @@ server {
location ~ ^{{ CREDENTIALS_STATIC_URL }}(?P<file>.*) {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' "$cors_header";
add_header 'Access-Control-Allow-Origin' "$cors_header" always;
add_header 'Access-Control-Allow-Methods' 'GET, POST';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Max-Age' 1728000;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment