nginx上加好Access-Control-Allow-Origin头部,跨域依旧失败的问题
nginx文档也已说明,只需要在指令后面加上“always”参数即可
add_header Access-Control-Allow-Origin * always; 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,Authorization,Range' always;