CORS issue
temuujin-bat
HOBBYOP

a year ago

Access to XMLHttpRequest at 'https://fixitowner-production.up.railway.app/api/admin/dashboard/get' from origin 'https://fixity.netlify.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Cors issue even tho, my backend looks fine

const corsOptions: CorsOptions = { origin: 'https://fixity.netlify.app', methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'], allowedHeaders: ['Content-Type', 'Authorization', 'X-Requested-With'], credentials: true, exposedHeaders: ['Set-Cookie'], }; app.use(cors(corsOptions)); app.options('*', cors(corsOptions));

Closed

2 Replies


a year ago

Hey @Timor, please do not open duplicate help threads, I have answered you in the linked thread.

@Loudbook thank you for raising this, I'll go ahead and close this thread.


Status changed to Closed uxuz 12 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...