cors setup and dev server proxy

This commit is contained in:
Will H
2024-07-05 16:25:00 +12:00
parent 7383673636
commit 5ace7616d0
3 changed files with 12 additions and 13 deletions

View File

@ -59,15 +59,7 @@ async function bootstrap() {
}),
);
if (process.env.NODE_ENV !== 'production') {
// make development easy
app.enableCors({
origin: ['http://localhost:5173'],
credentials: true,
});
} else {
app.enableCors();
}
app.enableCors();
app.useGlobalInterceptors(new TransformHttpResponseInterceptor());
app.enableShutdownHooks();