1 个回答

nginx配置跨域,只需要在nginx的conf里面的location里面配置跨域参数即可,跨域参数是:
add_header 'Access-Control-Allow-Origin' *;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' *;
add_header 'Access-Control-Allow-Headers' 'Origin,X-Requested-With,Content-Type,Accept,token';
具体配置如下图:
发布于:4个月前 (11-27)
我来回答
您需要 登录 后回答此问题!