kevmok
PROOP
10 months ago
I am having trouble getting around CORS issues between my frontend and backend.
My frontend has a public railway domain that I am allowing in my backend
cors({
origin: [env.AGORA_URL],
methods: ["GET", "POST", "PUT", "DELETE"],
}),
...In my frontend I am using my backend's internal url as an env varVITE_MERCURY_URL=mercury.railway.internal:8080
And in my backend i'm doing something similarAGORA_URL=https://agora-development.up.railway.app:8080
Is this the correct way to set it up? Or does the backend also need a public url?
I've tried changing the ports and also removing them but it does not seem to work