add_header 'Access-Control-Allow-Origin' '*'; # 允许所有来源的请求
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; # 允许的方法
add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; # 允许的请求头
增加位置如上图:
![点击查看原图 1111.png](https://www.wlphp.com/content/uploadfile/202312/076c1702452875.png)