解决js跨域使用nginx配置问题
在server域中加入以下配置:
#解决跨域问题 add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Credentials true; add_header Access-Control-Allow-Headers Origin,X-Requested-With,Content-Type,Accept,x-language; add_header Access-Control-Allow-Methods POST,GET,OPTIONSZ,PUT,DELETE;
重启nginx即可.