Skip to content

Commit 98c64bc

Browse files
committed
docs(security): rename package helmet for fastify
1 parent a1e7081 commit 98c64bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/security/helmet.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@ app.use(helmet());
2424
2525
#### Use with Fastify
2626

27-
If you are using the `FastifyAdapter`, install the [fastify-helmet](https://github.com/fastify/fastify-helmet) package:
27+
If you are using the `FastifyAdapter`, install the [@fastify/helmet](https://github.com/fastify/fastify-helmet) package:
2828

2929
```bash
30-
$ npm i --save fastify-helmet
30+
$ npm i --save @fastify/helmet
3131
```
3232

3333
[fastify-helmet](https://github.com/fastify/fastify-helmet) should not be used as a middleware, but as a [Fastify plugin](https://www.fastify.io/docs/latest/Reference/Plugins/), i.e., by using `app.register()`:
3434

3535
```typescript
36-
import { fastifyHelmet } from 'fastify-helmet';
36+
import { fastifyHelmet } from '@fastify/helmet';
3737
// somewhere in your initialization file
3838
await app.register(fastifyHelmet);
3939
```
4040

41-
> 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:
41+
> 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:
4242
>
4343
> ```typescript
4444
> await app.register(fastifyHelmet, {

0 commit comments

Comments
 (0)