Seeking Assistance: CORS Issue Despite Proper Headers Configuration

velox8TRIAL

a year ago

I hope you're doing well. I'm currently facing a CORS (Cross-Origin Resource Sharing) issue while working on [mention the project or application]. Despite implementing CORS headers correctly and ensuring the validity of the address, I'm encountering blocking from a different domain.

I've set up the necessary CORS headers on my server-side and confirmed the address validity, yet the CORS policy persists. I'm seeking advice or insights on how to troubleshoot this issue effectively.

Any guidance, suggestions, or previous experiences shared would be immensely helpful in resolving this obstacle.

Thank you in advance for your assistance and support!

Solved

6 Replies

velox8TRIAL

a year ago

I have a Node.js server set up and installed Express and CORS. I've configured the headers, but it's still blocking requests from another domain."


osmanityTRIAL

a year ago

I have done the exact same and still the cors issue persists, any solution?


osmanityTRIAL

a year ago

Never mind i find the problem i had by solving the issue by added the "s" in "https://" instead of "http://" which cause the CORS problem


betoobernalPRO

a year ago

Never mind i find the problem i had by solving the issue by added the "s" in "https://" instead of "http://" which cause the CORS problem

the problem persists, i'm added "https". I have two origins different but the preflight OPTIONS request fails.


a year ago

CORS errors may not be the actual issue here, it is likely just a side effect of a bigger issue.

What page do you get when you open up your deployments link directly in your browser?


betoobernalPRO

a year ago

Apologies for the confusion earlier. I mistakenly altered the PORT environment variable and opted to use BACKEND_PORT instead. This decision was prompted by a 503 error code that I encountered. I referred to this guide for assistance: Fixing Common Errors. Consequently, I reverted the changes and reinstated the original PORT variable name.


Status changed to Solved railway[bot] 12 months ago