Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/lowmess/lameass.recipes. A recipe site, but without the ads and 3,000 word essays lameass.recipes
nextjs sanity-io theme-ui typescript
Something went wrong. Try again.
lameass.recipes next.config.js
1.0 kB · 59 lines
JavaScript
at develop
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960const contentSecurityPolicy = ` default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; child-src 'none'; style-src 'self' 'unsafe-inline'; img-src 'self' blob: data:; media-src 'none'; connect-src *; font-src 'self';`
const securityHeaders = [ { key: 'Content-Security-Policy', value: contentSecurityPolicy.replace(/\n/g, ''), }, { key: 'Referrer-Policy', value: 'strict-origin', }, { key: 'X-Frame-Options', value: 'DENY', }, { key: 'X-Content-Type-Options', value: 'nosniff', }, { key: 'X-DNS-Prefetch-Control', value: 'on', }, { key: 'Strict-Transport-Security', value: 'max-age=31536000; includeSubDomains; preload', }, { key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=()', },]
const nextConfig = { // eslint-disable-next-line require-await async headers() { return [ { source: '/', headers: securityHeaders, }, { source: '/:path*', headers: securityHeaders, }, ] },}
module.exports = nextConfig