Skip to content

Commit 55af139

Browse files
author
Mick Lawitzke
authored
Update helmet.md
Old import was not working anymore, error: > Argument of type 'typeof import("/.../node_modules/fastify-helmet/index")' is not assignable to parameter of type 'FastifyPluginCallback<any, Server> | FastifyPluginAsync<any, Server> | Promise<{ default: FastifyPluginCallback<any, Server>; }> | Promise<...>'. fastify-helmet: 5.3.0 helmet: 4.4.1 @nestjs/platform-fastify: 7.6.14 & 8.0.0-alpha.3
1 parent 4c3aa5f commit 55af139

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/security/helmet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $ npm i --save fastify-helmet
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/Plugins/), i.e., by using `app.register()`:
3434

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

0 commit comments

Comments
 (0)