enable cors in railway app

glitchdetectedTRIAL

5 months ago

how do i enable cors in railway app and use it to communicate with my vercel app

Solved

0 Replies

5 months ago

Thats something you need to do in your code, what web server framework are you using?


glitchdetectedTRIAL

5 months ago

express.js for my backend, next.js for my frontend, and discord.js for my bot


glitchdetectedTRIAL

5 months ago

and all of them are using typescript


5 months ago

please see the express docs -


glitchdetectedTRIAL

5 months ago

the cors only work during localhost but not when its deployed publicly


5 months ago

you would need to configure the cors middleware correctly


glitchdetectedTRIAL

5 months ago

1330354590578901000


glitchdetectedTRIAL

5 months ago

like in the middlewares?


glitchdetectedTRIAL

5 months ago

file?


glitchdetectedTRIAL

5 months ago

folder i mean


5 months ago

sorry but please see the docs i linked above, we aren't able to provide coding support here


glitchdetectedTRIAL

5 months ago

jwt could be wrong


glitchdetectedTRIAL

5 months ago

do you know how i can generate a jwt in railway's cli?


5 months ago

that has nothing to do with the railway cli, or railway in general


glitchdetectedTRIAL

5 months ago

ok


5 months ago

!s


Status changed to Solved brody 5 months ago


enable cors in railway app - Railway Help Station