The PR activates the app router for the Blog page at /blog. Its purpose is to test Next.js changes within nx-dev, allowing us to identify and address any issues that users might encounter. Integrating these changes into our environment, we can gain firsthand experience and insights into potential problems, ensuring that the updates are robust and reliable. This approach helps us improve the overall quality and user experience of our platform by proactively identifying and resolving any issues that could affect consumers.
49 lines
1.3 KiB
JavaScript
49 lines
1.3 KiB
JavaScript
// nx-ignore-next-line
|
|
const { withNx } = require('@nx/next/plugins/with-nx');
|
|
const redirectRules = require('./redirect-rules');
|
|
|
|
module.exports = withNx({
|
|
// Disable the type checking for now, we need to resolve the issues first.
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
// For both client and server
|
|
env: {
|
|
VERCEL: process.env.VERCEL,
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: '/:path*',
|
|
headers: [
|
|
{ key: 'X-DNS-Prefetch-Control', value: 'on' },
|
|
{
|
|
key: 'Strict-Transport-Security',
|
|
value: 'max-age=63072000; includeSubDomains; preload',
|
|
},
|
|
{ key: 'X-XSS-Protection', value: '1; mode=block' },
|
|
{ key: 'X-Content-Type-Options', value: 'nosniff' },
|
|
{ key: 'X-Frame-Options', value: 'DENY' },
|
|
{ key: 'Referrer-Policy', value: 'no-referrer' },
|
|
],
|
|
},
|
|
];
|
|
},
|
|
async redirects() {
|
|
const rules = [];
|
|
|
|
// Apply all the redirects from the redirect-rules.js file
|
|
for (const section of Object.keys(redirectRules)) {
|
|
for (const source of Object.keys(redirectRules[section])) {
|
|
rules.push({
|
|
source: source,
|
|
destination: redirectRules[section][source],
|
|
permanent: true,
|
|
});
|
|
}
|
|
}
|
|
|
|
return rules;
|
|
},
|
|
});
|