Skip to content

Commit b7fc7d0

Browse files
Merge pull request #1628 from stingalleman/patch-1
fix(security/helmet): fix import statement
2 parents 37a1338 + b89bc24 commit b7fc7d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/security/helmet.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import * as helmet from 'helmet';
2020
app.use(helmet());
2121
```
2222

23+
> info **Hint** If you are getting the `This expression is not callable` error while trying to import `Helmet`, you very likely have the `allowSyntheticDefaultImports` and `esModuleInterop` options set to `true` in your project's `tsconfig.json` file. If that's the case, change the import statement to: `import helmet from 'helmet'` instead.
24+
2325
#### Use with Fastify
2426

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

0 commit comments

Comments
 (0)