Skip to content

Commit 474491c

Browse files
Update cors.md
1 parent d088908 commit 474491c

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

content/security/cors.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,3 @@ Or, pass a [CORS configuration object](https://github.com/expressjs/cors#configu
2121
const app = await NestFactory.create(AppModule, { cors: true });
2222
await app.listen(3000);
2323
```
24-
25-
Above method only applies to REST endpoints.
26-
27-
To enable CORS in GraphQL, set `cors` property to `true` or pass [CORS configuration object](https://github.com/expressjs/cors#configuration-options) or a [callback function](https://github.com/expressjs/cors#configuring-cors-asynchronously) as the `cors` property value when you import GraphQL module.
28-
29-
> warning **Warning** `CorsOptionsDelegate` solution is not working with the `apollo-server-fastify` package yet.
30-
31-
```typescript
32-
GraphQLModule.forRoot({
33-
cors: {
34-
origin: 'http://localhost:3000',
35-
credentials: true,
36-
},
37-
}),
38-
```

0 commit comments

Comments
 (0)