diff --git a/examples/next/tutorial/next.config.js b/examples/next/tutorial/next.config.js new file mode 100644 index 000000000..1a7a8dff0 --- /dev/null +++ b/examples/next/tutorial/next.config.js @@ -0,0 +1,25 @@ +const { createSecureHeaders } = require('next-secure-headers'); + +/** + * @type {import('next').NextConfig} + **/ +module.exports = withFaust({ + reactStrictMode: true, + sassOptions: { + includePaths: ['node_modules'], + }, + images: { + domains: [getWpHostname()], + }, + + async headers() { + return [ + { + source: '/:path*', + headers: createSecureHeaders({ + xssProtection: false, + }), + }, + ]; + }, +}); diff --git a/examples/next/tutorial/package-lock.json b/examples/next/tutorial/package-lock.json index 52ef4f3de..0338995d8 100644 --- a/examples/next/tutorial/package-lock.json +++ b/examples/next/tutorial/package-lock.json @@ -14,6 +14,7 @@ "@faustwp/core": "^3.1.0", "graphql": "^16.10.0", "next": "15.1.6", + "next-secure-headers": "^2.2.0", "react": "^19.0.0", "react-dom": "^19.0.0" }, @@ -5392,6 +5393,15 @@ } } }, + "node_modules/next-secure-headers": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/next-secure-headers/-/next-secure-headers-2.2.0.tgz", + "integrity": "sha512-C7OfZ9JdSJyYMz2ZBMI/WwNbt0qNjlFWX9afUp8nEUzbz6ez3JbeopdyxSZJZJAzVLIAfyk6n73rFpd4e22jRg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/next/node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", diff --git a/examples/next/tutorial/package.json b/examples/next/tutorial/package.json index 93d88adf1..cb74b7516 100644 --- a/examples/next/tutorial/package.json +++ b/examples/next/tutorial/package.json @@ -17,6 +17,7 @@ "@faustwp/core": "^3.1.0", "graphql": "^16.10.0", "next": "15.1.6", + "next-secure-headers": "^2.2.0", "react": "^19.0.0", "react-dom": "^19.0.0" },