From bfb2c99b2a322559df1f83ee49d07dce1c656969 Mon Sep 17 00:00:00 2001 From: Sam Robbins Date: Tue, 22 Jun 2021 08:36:31 +0100 Subject: [PATCH 1/2] Update security-headers.md --- docs/advanced-features/security-headers.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/advanced-features/security-headers.md b/docs/advanced-features/security-headers.md index db5be67f1ebaa..a4ac3ceb9fef6 100644 --- a/docs/advanced-features/security-headers.md +++ b/docs/advanced-features/security-headers.md @@ -13,14 +13,16 @@ To improve the security of your application, you can use [`headers`](/docs/api-r // after learning more below. const securityHeaders = []; -async headers() { - return [ - { - // Apply these headers to all routes in your application. - source: '/(.*)', - headers: securityHeaders - } - ] +module.exports = { + async headers() { + return [ + { + // Apply these headers to all routes in your application. + source: '/(.*)', + headers: securityHeaders + } + ] + } } ``` From 066978f20922d7dcc6b962a26b67f16bf936c173 Mon Sep 17 00:00:00 2001 From: Sam Robbins Date: Tue, 22 Jun 2021 08:49:14 +0100 Subject: [PATCH 2/2] Fix prettier error --- docs/advanced-features/security-headers.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/advanced-features/security-headers.md b/docs/advanced-features/security-headers.md index a4ac3ceb9fef6..1fe223855cb70 100644 --- a/docs/advanced-features/security-headers.md +++ b/docs/advanced-features/security-headers.md @@ -11,7 +11,7 @@ To improve the security of your application, you can use [`headers`](/docs/api-r // You can choose which headers to add to the list // after learning more below. -const securityHeaders = []; +const securityHeaders = [] module.exports = { async headers() { @@ -19,10 +19,10 @@ module.exports = { { // Apply these headers to all routes in your application. source: '/(.*)', - headers: securityHeaders - } + headers: securityHeaders, + }, ] - } + }, } ```