Hi , I have hosted both frontend and backend on tw...
# support-questions-legacy
a
Hi , I have hosted both frontend and backend on two different domains , but I am facing a CORS issue , Access to fetch at 'https://sso-dev.tpml.in/auth/signinup/code' from origin 'https://web-dev.tpml.in' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled app.enableCors({ origin: SuperTokensConfig.appInfo.websiteDomain, allowedHeaders: ['content-type', ...supertokens.getAllCORSHeaders()], methods:["GET", "PUT", "POST", "DELETE","OPTIONS"], credentials: true, }); app.use(middleware()); app.useGlobalFilters(new SupertokensExceptionFilter()); above is the code I have in my backend in main.ts file . Am i missing something? I am using nest JS in backend
11 Views