Hi developers,
I am so confuse this problem.
my erp next is work fine in localhost,
but when I fetch the resources in another page, it was confuse me, can any way to avoid Cross domain?
and then I fetch :
fetch("http://127.0.0.1:8080/login", {
"headers": {
"accept": "*/*",
"accept-language": "zh-CN,zh;q=0.9,en;q=0.8"
},
"referrer": "http://127.0.0.1:8080",
"referrerPolicy": "no-referrer-when-downgrade",
"body": null,
"method": "GET",
"mode": "cors"
});
it return nomally, so I think it just happen when redirect event.
My nginx config is :
server {
listen 8080;
server_name localhost;
location / {
# root html;
# index index.html index.htm;
proxy_pass http://127.0.0.1:80;
# proxy_pass http://127.0.0.1:8000;
# proxy_pass http://127.0.0.1:9000;
# proxy_pass http://127.0.0.1:9001;
# proxy_pass http://127.0.0.1:9002;
add_header Access-Control-Allow-Origin $http_origin;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
docker container port reflect is :
0.0.0.0:80->80/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:9000-9002->9000-9002/tcp