server{ server_name ; listen 80 default_server; add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Methods 'GET,POST'; add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; access_log /var/log/nginx/uwsgi_xxx.log; location / { include uwsgi_params; uwsgi_pass unix:/myfiles/my_project/my_project/script/uwsgi.sock; } }
add_header 跨域配置
没有重来的机会,一定要珍惜当下。不然···· 你连现在拥有的都会失去!