hey, try a global options handler in your express setup. sometimes the preflight messes up if not caught. also check your railway port and timeout settings - they might be off. hope this helps, cheers!
In my experience managing similar setups, a 502 error during CORS preflight is often a sign that the issue extends beyond simple CORS configuration. An important step is to ensure that the Express server is fully configured to handle OPTIONS requests, which are crucial for CORS negotiations. I encountered similar issues and found that adding thorough logging to capture middleware activities helped identify misrouted or dropped requests. Additionally, reviewing the network configurations and potential server timeouts on Railway assisted in isolating the source of the error.
hey, im curious if anyone has tried adding an explicit options handler? sometimes a little extra logging on the preflight can help catch hidden misconfigs. has anyone noticed any pattern with these drop’d requests?