Error 405 - Cors not allowed
odin042
HOBBYOP

8 months ago

Hi,

My project, the React + typescript (frontend) and Node.js ( Backend). I received messages erros CORS not Allowed, but last week its worked normally.

My ID project: cba4be01-f16e-4b88-998d-148df8aadc4c

Solved$10 Bounty

Pinned Solution

odin042
HOBBYOP

8 months ago

I Resolved , apparently in railway config , I need configure railpack for project use Bun for build. Before configured this, my project work. Thanks for help slightly_smiling_face emoji

Attachments

6 Replies

8 months ago

Did you configure cors correctly? I found this article which might be a bit of help:
https://medium.com/@dhanushsaireddy8/resolving-cors-issues-in-express-and-react-js-a-comprehensive-guide-31ca5d58f90b


noahd

Did you configure cors correctly? I found this article which might be a bit of help:https://medium.com/@dhanushsaireddy8/resolving-cors-issues-in-express-and-react-js-a-comprehensive-guide-31ca5d58f90b

odin042
HOBBYOP

8 months ago

Thanks for the answer. But that didn't solve it. Even if I leave CORS as *, it only gives an error when I go to railway, locally it works


own171
HOBBY

8 months ago

Did you configure it for your Railway domain or localhost?


own171

Did you configure it for your Railway domain or localhost?

odin042
HOBBYOP

8 months ago

I have configured both the local host and the front-end domains that are in vercel


8 months ago

Are you registering CORS before you register your backend routes?


odin042
HOBBYOP

8 months ago

I Resolved , apparently in railway config , I need configure railpack for project use Bun for build. Before configured this, my project work. Thanks for help slightly_smiling_face emoji

Attachments


Status changed to Solved brody 8 months ago


Loading...