关于跨域的问题,是老生常谈了....这回又出现了...
不过这个跨域问题是可以在nginx中配置解决了:
直接看nginx.conf配置文件把:
下面的:
charset utf-8;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers Origin,X-Requested-Width,Content-Type,Accept;
这一部分就是用来解决跨域的
server {
listen 8001;
server_name localhost;
charset utf-8;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers Origin,X-Requested-Width,Content-Type,Accept;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root D:/ALLSVN/ydy/YdyFront;
index userLogin.html userLogin.htm;
}
location