Skip to content

Commit b2e8d68

Browse files
committed
test
1 parent 0d54ff7 commit b2e8d68

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

โ€Žsrc/backend/src/app.module.tsโ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@ import { UserModule } from './user/user.module';
1717
driver: ApolloDriver,
1818
useFactory: () => ({
1919
autoSchemaFile: join(process.cwd(), 'schema.graphql'),
20-
context: ({ req }) => ({
20+
context: ({ req, res }) => ({
2121
req,
22+
res,
2223
}),
2324
debug: true,
2425
playground: true,
2526
sortSchema: true,
27+
introspection: true,
28+
cache: 'bounded',
2629
}),
2730
}),
2831
ContentModule,

โ€Žsrc/backend/src/main.tsโ€Ž

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,8 @@ async function bootstrap() {
66
const app = await NestFactory.create(AppModule);
77

88
app.enableCors({
9-
origin: [process.env.CLIENT_ENDPOINT],
9+
origin: process.env.CLIENT_ENDPOINT,
1010
credentials: true,
11-
methods: ['GET', 'HEAD', 'PUT', 'PATCH', 'POST', 'DELETE', 'OPTIONS'],
12-
allowedHeaders: [
13-
'Content-Type',
14-
'Accept',
15-
'Authorization',
16-
'Apollo-Require-Preflight',
17-
],
18-
exposedHeaders: ['Access-Control-Allow-Origin'],
1911
});
2012

2113
await app.listen(process.env.PORT ?? 3001);

0 commit comments

Comments
ย (0)