一、原生态
location ^~ /repurchase-web/ {
alias /var/www/webapps/repurchase-web/;
}
二、支持跨域
location ^~ /repurchase-web/ {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Credentials true;
alias /var/www/webapps/repurchase-web/;
}
在中间添加
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Credentials true;
即可。