Yet another CORS issue #796
-
Shlink web client version
SummaryI went through all the troubleshooting docs, went through several closed issues related to CORS in this repo but idk if its my setup or what... DescriptionI've the server hosted on sh.my-domain.com and client on sh-client.my-domain.com. I've 1 virtual machine running both server (port 5232) and client(port 5233) as well as nginx (port 80/443). Error that I'm getting is (typical CORS error)
I've added the CORS headers on the nginx block (for the shlink server) and when I do "curl -v" (from inside the shlink-web-client container), you can see the
Your help/insight would be much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
I had another question (Q2), is there a way the client could communicate to server via internal network. Basically consider a backend and database type of relation - in docker-compose you can define a network for backend and DB and then you're good to go. Since I'm hosting both (server and client) in same network, I tried to set server as the localhost:port but that didnt work |
Beta Was this translation helpful? Give feedback.
-
I see you are using cloudflare. The CORS issue is probably happening because it is blocking the preflight request. Try to run the same cURL, but with |
Beta Was this translation helpful? Give feedback.
-
On a side note: In order to remove the CORS error, I tried serving both backend and frontend from same subdomain. Backend from path "/back" (using BASE_PATH env variable) but it didn't work...
Do you see any flaw with this logic? |
Beta Was this translation helpful? Give feedback.
Maybe try this? #793