CORS
I've deployed my FastAPI api on railway it works fine but when frontend wants to access it there's a redirect and cors error.
14 Replies
Project ID:
e16686fb-b7f0-46b3-a929-16ad1c2aee78
service ID: e16686fb-b7f0-46b3-a929-16ad1c2aee78
Have you tried setting the CORS policy on your server to allow for requests from your localhost?
@Fragly this is what I did
okay I'm out of ideas 💀
Alright
have you checked to see what cors headers are being sent on the failed request?
The Accept control allow origin header
what are the headers values
I don't understand please
Accept, Accept-Language, Content-Language and Content-Type are the list of the http request headers, this is from fastapi documentation. The wildcard "*" allows for all
#🛂|readme #5
Sorry about that, just got here today because of this urgent problem
im sorry but these help threads are for issues relating to railway, coding help is a bit out of the scope of these threads
Okay