Skip to content

Commit

Permalink
style: remove trailing whitespace (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Nov 3, 2024
1 parent 39ee200 commit 6bf2033
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![CI](https://github.com/fastify/fastify-helmet/workflows/CI/badge.svg)
[![NPM version](https://img.shields.io/npm/v/@fastify/helmet)](https://www.npmjs.com/package/@fastify/helmet)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)

Important security headers for Fastify. It is a tiny wrapper around
[helmet](https://npm.im/helmet).
Expand Down Expand Up @@ -88,15 +88,15 @@ fastify.get('/here-we-use-helmet-reply-decorator', async (request, reply) => {
await reply.helmet({ frameguard: false })
}

return {
return {
message: 'we use the helmet reply decorator to conditionally apply helmet middlewares'
}
})
```

### `helmet` route option

`@fastify/helmet` allows you to enable, disable, and customize helmet for each one of your application hooks by using the
`@fastify/helmet` allows you to enable, disable, and customize helmet for each one of your application hooks by using the
`helmet` shorthand route option when you register your application routes.

If you want to disable helmet for a specific endpoint you must pass `{ helmet: false }` to your route options.
Expand Down Expand Up @@ -169,7 +169,7 @@ fastify.register(
fastify.register(
helmet,
// customize content security policy with nonce generation
{
{
enableCSPNonces: true,
contentSecurityPolicy: {
directives: {
Expand All @@ -192,7 +192,7 @@ fastify.get('/', function(request, reply) {
```js
fastify.register(
helmet,
{
{
contentSecurityPolicy: {
directives: {
defaultSrc: ["'self'"],
Expand Down

0 comments on commit 6bf2033

Please sign in to comment.