nginx 跨域配置

  1. server {
  2. listen 80;
  3. server_name b.com;
  4. location /{
  5. if ( $http_referer ~* (a.com|b.com|c.com) ) {
  6. Access-Control-Allow-Origin: *
  7. }
  8. }
  9. }
posted @ 2016-06-12 15:42  Yanyd  阅读(1225)  评论(0编辑  收藏  举报