CORS error
etomit
FREEOP

9 months ago

I'm doing a project for school and need to deploy it on a server so I'm using Railway, I have already my database stored in a o2switch server which are already working good with my local projet, but I have an issue with the railway project my back is in laravel and I have a cors error, despite I have entered good adress and good port, also it take a lot of time to respond sometime

Solved$10 Bounty

Pinned Solution

9 months ago

Hey, please make sure that everything is deployed in the same region near you or your database, this will minimize latency. As for the the CORS issue, this is something you will have to fix on the application level, such as adding an Access-Control-Allow-Origin header.

4 Replies

9 months ago

Hey, please make sure that everything is deployed in the same region near you or your database, this will minimize latency. As for the the CORS issue, this is something you will have to fix on the application level, such as adding an Access-Control-Allow-Origin header.


etomit
FREEOP

9 months ago

Hello I have solved the issue about cors error I didn't change a thing and it worked, I ve done redeploy to make sure everything was good and it is.


uxuz

Hey, please make sure that everything is deployed in the same region near you or your database, this will minimize latency. As for the the CORS issue, this is something you will have to fix on the application level, such as adding an Access-Control-Allow-Origin header.

etomit
FREEOP

9 months ago

about time response I still have this issue, took about 10 sec to get a response when i'm using my frontend app, I don't have this issue using postman


9 months ago

Does the frontend fetch the data itself or is the frontend fetching the data on a server (SSR, server components, etc.)? The latter may have more latency if the frontend's server is far away from the backend.


Status changed to Solved sarahkb125 9 months ago


Loading...