Skip to content

Commit

Permalink
HSTS: add note about localhost redirects
Browse files Browse the repository at this point in the history
See [this issue](#451).
  • Loading branch information
EvanHahn committed Feb 17, 2024
1 parent 2f2fee3 commit 7674c63
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ app.use(
);
```

You may wish to disable this header for local development, as it can make your browser force redirects from `http://localhost` to `https://localhost`, which may not be desirable if you develop multiple apps using `localhost`. See [this issue](https://github.com/helmetjs/helmet/issues/451) for more discussion.

You can use this as standalone middleware with `app.use(helmet.strictTransportSecurity())`.

</details>
Expand Down

0 comments on commit 7674c63

Please sign in to comment.