You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 line
543 B

  1. add_header 'Access-Control-Allow-Origin' '*' always;
  2. add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
  3. #
  4. # Custom headers and headers various browsers *should* be OK with but aren't
  5. #
  6. add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type' always;
  7. #
  8. # Tell client that this pre-flight info is valid for 20 days
  9. #
  10. add_header 'Access-Control-Max-Age' $access_control_max_age always;
  11. if ($request_method = OPTIONS) {
  12. return 204;
  13. }