在配置nginx 服务器的时候,一直报 404 not find
经查在前端访问后端的过程,存在着跨域行为,需要在头文件添加一些参数如下
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
在配置nginx 服务器的时候,一直报 404 not find
经查在前端访问后端的过程,存在着跨域行为,需要在头文件添加一些参数如下
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
转载于:https://www.cnblogs.com/king258/p/11086769.html