Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- location ~ ^/app1(\/)(.*)$ {
- if ($request_method = 'OPTIONS') {
- add_header 'Access-Control-Allow-Origin' 'http://localhost/app1/';
- add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
- add_header 'Access-Control-Max-Age' 1728000;
- add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
- add_header 'Content-Type' 'text/plain; charset=utf-8';
- add_header 'Content-Length' 0;
- return 204;
- }a
- if ($request_method = (GET|POST|OPTIONS|HEAD)) {
- add_header 'Access-Control-Allow-Origin' 'http://localhost/app1/';
- add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
- add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
- add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
- add_header 'Access-Control-Allow-Credentials' 'true'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement