fix(api): enable CORS for browser client requests
This commit is contained in:
@@ -5,6 +5,10 @@ import { AppModule } from "./app.module";
|
|||||||
|
|
||||||
async function bootstrap(): Promise<void> {
|
async function bootstrap(): Promise<void> {
|
||||||
const app = await NestFactory.create(AppModule);
|
const app = await NestFactory.create(AppModule);
|
||||||
|
app.enableCors({
|
||||||
|
origin: true,
|
||||||
|
credentials: true
|
||||||
|
});
|
||||||
app.useGlobalPipes(
|
app.useGlobalPipes(
|
||||||
new ValidationPipe({
|
new ValidationPipe({
|
||||||
transform: true,
|
transform: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user