文章目录
[+]
location / { if ($request_method = OPTIONS ) { add_header Access-Control-Allow-Origin http://你的域名; add_header Access-Control-Allow-Headers Origin,X-Requested-With,Content-Type,Accept; return 200; } ---------- }

(图片来自网络侵删)