在 nginx 配置中添加

server {
    listen 80;
    server_name ....
    root ....;
    
    # Cross Domains
    add_header Access-Control-Allow-Origin "*";
    add_header Access-Control-Allow-Methods "OPTION, POST, GET";
    add_header Access-Control-Allow-Headers "*";
}

标签: none

添加新评论