How to set cross-domain with cookie in vue axios

the project uses axios to request node backend. You need to bring cookie,. axios.defaults.withCredentials=true is already configured. However, the problem is that the address of the foreground is not fixed after the project is packaged into apk, and the backend node configuration is cross-domain `var corsOptions = {

.
origin: ["http://localhost:8088", "http://192.168.4.243:8080","http://127.0.0.1:11056"],
credentials:true

} `change how to modify

as follows
Mar.02,2021

what server does your front-end project use? You can configure a reverse proxy to solve


what I want to ask is, if the foreground and background are separated, can the backend still get Cookie? Hope to answer, thank you, this is a question that has been bothering me for some time

Menu