| 
1 | 1 |  if ($request_method = 'OPTIONS') {  | 
2 |  | - add_header 'Access-Control-Allow-Origin' '$cors_origin';  | 
3 |  | - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';  | 
4 |  | - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';  | 
5 |  | - add_header 'Access-Control-Max-Age' 1728000;  | 
6 |  | - add_header 'Content-Type' 'text/plain; charset=utf-8';  | 
7 |  | - add_header 'Content-Length' 0;  | 
 | 2 | + add_header 'Access-Control-Allow-Origin' $cors_origin always;  | 
 | 3 | + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;  | 
 | 4 | + add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;  | 
 | 5 | + add_header 'Access-Control-Max-Age' 1728000 always;  | 
 | 6 | + add_header 'Content-Type' 'text/plain; charset=utf-8' always;  | 
 | 7 | + add_header 'Content-Length' 0 always;  | 
8 | 8 |  return 204;  | 
9 | 9 |  }  | 
10 | 10 |  if ($request_method = 'POST') {  | 
11 |  | - add_header 'Access-Control-Allow-Origin' '$cors_origin';  | 
12 |  | - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';  | 
13 |  | - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';  | 
14 |  | - add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';  | 
 | 11 | + add_header 'Access-Control-Allow-Origin' $cors_origin always;  | 
 | 12 | + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;  | 
 | 13 | + add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;  | 
 | 14 | + add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;  | 
15 | 15 |  }  | 
16 | 16 |  if ($request_method = 'GET') {  | 
17 |  | - add_header 'Access-Control-Allow-Origin' '$cors_origin';  | 
18 |  | - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';  | 
19 |  | - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';  | 
20 |  | - add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';  | 
 | 17 | + add_header 'Access-Control-Allow-Origin' $cors_origin always;  | 
 | 18 | + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;  | 
 | 19 | + add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;  | 
 | 20 | + add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;  | 
21 | 21 |  }  | 
0 commit comments