Skip to content

Commit

Permalink
Merge pull request #2092 from zesty-io/feat/next-14
Browse files Browse the repository at this point in the history
website: next 14 upgrade and optimize
  • Loading branch information
ardeay authored Nov 6, 2023
2 parents c2a5f0a + a4c4db7 commit 875bf94
Show file tree
Hide file tree
Showing 80 changed files with 904 additions and 2,229 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v18
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.18-alpine3.18
FROM node:20.9.0-alpine3.18

RUN npm install -g pnpm

Expand Down
40 changes: 36 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
// const { fetchZestyRedirects } = require('./src/lib/zesty/fetchRedirects');
const zestyConfig = require('./zesty.config.json');

const advancedHeaders = [
{
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-Frame-Options',
value: 'SAMEORIGIN',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'Referrer-Policy',
value: 'origin-when-cross-origin',
},
];
module.exports = {
trailingSlash: true,
reactStrictMode: true,
env: {
zesty: zestyConfig,
},
eslint: {
ignoreDuringBuilds: true,
},
images: {
domains: [
'be93523bd41e2e475e74-e4edef19ad51123442eaceed55c78461.ssl.cf2.rackcdn.com',
Expand All @@ -17,4 +40,13 @@ module.exports = {
],
},
swcMinify: true,
poweredByHeader: false,
async headers() {
return [
{
source: '/:path*',
headers: advancedHeaders,
},
];
},
};
Loading

0 comments on commit 875bf94

Please sign in to comment.