error cors when has a lot of traffic
When my application has a lot of traffic, the cors error appears intermittently in my services (sometimes they work excellent and sometimes they fail and return cors error), on the other hand, in the schedules that I don't have a lot of traffic, the cors error disappears.
In addition, I have realized that it happens when there is a lot of traffic because in my DEV environment, I never have cors errors, and in PROD I do, having absolutely the same configuration in everything.
![No description](https://cdn.answeroverflow.com/1187505557196787722/image.png)
![No description](https://cdn.answeroverflow.com/1187505557519745095/image.png)
![No description](https://cdn.answeroverflow.com/1187505557981110282/image.png)
7 Replies
Project ID:
b76ecc00-eec3-4631-820a-ce2fb3feb095
8efba668-a446-400c-80da-2b2dee7aa428
This situation started to happen about 3 months ago, and it used to happen only some days, in the last month, it started to happen daily affecting the website traffic.
from your screenshots you are sending localhost as your cors headers, this would be a code issue
![No description](https://cdn.answeroverflow.com/1187507077158027314/image.png)
in this screenshot you are sending a wildcard, in the screenshot above you are sending localhost, railway does not set any cors headers what so ever, this is your apps doing
mmm ok let's suppose it is that, because it happens only when there is a high traffic in the app, and intermittently, and the cors error doesn't happen all the time? I have doubts about that situation, isn't it supposed to always have the cors error if that's the case?
I agree with you, this is very strange, and admittedly I can't explain it, but I know this isn't an issue with Railway
your app is unstable in some way or another, thats the best explanation I have