ajax 跨域 如果在head里面加了参数需要在 nginx add_header 里面添加
server {
listen 80;
server_name yourdomain.com;
location / {
# 允许跨域请求
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, c-xxxx-id';
时来天地皆同力,运去英雄不自由