location /xx/ {
alias /opt/xx/;
# 着重关注下面的代码
add_header Front-End-Https on;
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Allow-Methods' '*';
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
}
}
【nginx】解决跨域
猜你喜欢
转载自blog.csdn.net/ruisasaki/article/details/132474628
今日推荐
周排行