matrix-art

An image gallery for Matrix
git clone git://archive.git.mtrnord.blog/MTRNord/matrix-art.git
Log | Files | Refs | README | LICENSE

commit 6ec6e6a8610c4e08530e44e294e8304042008a8c
parent 4714dba4891626a8e4843af5422c590f840a3259
Author: MTRNord <mtrnord1@gmail.com>
Date:   Fri, 31 Dec 2021 16:13:07 +0100

Caching

Diffstat:
Mnext.config.js | 32++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+), 0 deletions(-)

diff --git a/next.config.js b/next.config.js @@ -1,4 +1,36 @@ /** @type {import('next').NextConfig} */ +const securityHeaders = [ + { + key: 'X-DNS-Prefetch-Control', + value: 'on' + }, + { + key: 'X-XSS-Protection', + value: '1; mode=block' + }, + { + key: 'X-Frame-Options', + value: 'SAMEORIGIN' + }, + { + key: 'X-Content-Type-Options', + value: 'nosniff' + }, + { + key: 'Referrer-Policy', + value: 'origin-when-cross-origin' + } +] + module.exports = { reactStrictMode: true, + async headers() { + return [ + { + // Apply these headers to all routes in your application. + source: '/(.*)', + headers: securityHeaders, + }, + ] + }, }