Skip to content

Commit da0e6c6

Browse files
author
Mick Lawitzke
authored
Update helmet.md
1 parent 9b32904 commit da0e6c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/security/helmet.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ $ npm i --save fastify-helmet
3535
```typescript
3636
import { fastifyHelmet } from 'fastify-helmet';
3737
// somewhere in your initialization file
38-
await app.register(helmet);
38+
await app.register(fastifyHelmet);
3939
```
4040
> warning **Warning** When using `apollo-server-fastify` and `fastify-helmet`, there may be a problem with [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) on the GraphQL playground, to solve this collision, configure the CSP as shown below:
4141
>
4242
> ```typescript
43-
> await app.register(helmet, {
43+
> await app.register(fastifyHelmet, {
4444
> contentSecurityPolicy: {
4545
> directives: {
4646
> defaultSrc: [`'self'`],
@@ -53,7 +53,7 @@ await app.register(helmet);
5353
> });
5454
>
5555
> // If you are not going to use CSP at all, you can use this:
56-
> await app.register(helmet, {
56+
> await app.register(fastifyHelmet, {
5757
> contentSecurityPolicy: false,
5858
> });
5959
> ```

0 commit comments

Comments
 (0)