so i have deployed my project.
Acess to XMLHttpRequest at 'https://api.checkapi.app/api/authorization/refresh' from origin 'https://checkapi.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
in local machine it works fine.
async function bootstrap() {
const app = await NestFactory.create(AppModule, {
cors: {
origin: process.env.CLIENT_URL,
credentials: true,
},
});
app.use(cookieParser());
app.use(mongoSanitize());
app.use(helmet());
const server = await app.listen(5000, () => {
console.log('server is working');
});
}
What i have tried: origin true or cors: true in create function. same in app.enableCorse.
tried app.ena.... without anything, or with options like allows header and preflight. Any ideas. I will be glad for any help