Merge pull request #57 from will2hew/will/url-setup

CORS setup and Vite devServer proxy
This commit is contained in:
Philip Okugbe
2024-07-07 09:42:51 +01:00
committed by GitHub
3 changed files with 12 additions and 13 deletions

View File

@ -60,15 +60,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();