https://supertokens.com/ logo
#support-questions
Title
# support-questions
m

Marques

02/19/2023, 8:12 PM
I'm having a CORS issue - I've had this problem before... but dunno how to fix it
Access-Control-Allow-Origin
Copy code
appInfo: {
    appName: 'RCRaceControl',
    apiDomain: 'http://localhost:8080',
    apiBasePath: "/auth",
  },
  recipeList: [
    Session.init(),
    ThirdPartyEmailPassword.init()
  ]
My React Project
Copy code
app.enableCors({
    origin: 'http://localhost:5173',
    allowedHeaders: ['content-type', ...SuperTokens.getAllCORSHeaders()],
    methods: ['GET', 'PUT', 'POST', 'DELETE'],
    credentials: true,
  });
My NestJS Project
My frontend is running on
http://localhost:5173
and my api is running on
http://localhost:8080
r

rp

02/20/2023, 5:32 AM
hey @Marques whats the cors error?
m

Marques

02/20/2023, 1:26 PM
I have since then fixed the error - for some reason
allowedHeaders: ['content-type', ...SuperTokens.getAllCORSHeaders()]
was messing it up