Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
chore(next.config): redirects/rewrites/headers are no longer experime…
Browse files Browse the repository at this point in the history
…ntal

Signed-off-by: Logan McAnsh <[email protected]>
  • Loading branch information
mcansh committed Jul 27, 2020
1 parent 2efc9d1 commit f5ec938
Showing 1 changed file with 63 additions and 63 deletions.
126 changes: 63 additions & 63 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,70 +41,70 @@ const nextConfig = {
experimental: {
modern: true,
plugins: true,
headers: () => [
{
source: '/manifest.webmanifest',
headers: [
{ key: 'content-type', value: 'application/manifest+json' },
{ key: 'cache-control', value: 'public, s-max-age=43200, immutable' },
],
},
{
source: '/feed.json',
headers: [
{ key: 'cache-control', value: 'public, s-max-age=43200, immutable' },
],
},
{
source: '/favicon.ico',
headers: [
{ key: 'cache-control', value: 'public, s-max-age=43200, immutable' },
],
},
{
source: '/atom',
headers: [
{ key: 'cache-control', value: 'public, s-max-age=43200, immutable' },
],
},
{
source: '/sw.js',
headers: [
{ key: 'cache-control', value: 'max-age=0' },
{ key: 'Service-Worker-Allowed', value: '/' },
],
},
],
rewrites: () => [
{
source: '/sw.js',
destination: '/_next/static/sw.js',
},
{
source: '/atom',
destination: '/atom.xml',
},
{
source: '/.well-known/brave-rewards-verification.txt',
destination: '/brave-rewards-verification.txt',
},
{
source: '/manifest.webmanifest',
destination: '/manifest.webmanifest',
},
{
source: '/manifest.json',
destination: '/manifest.webmanifest',
},
],
redirects: () => [
{
source: '/changelog',
statusCode: 301,
destination: 'https://github.com/mcansh/blog/releases',
},
],
},
headers: () => [
{
source: '/manifest.webmanifest',
headers: [
{ key: 'content-type', value: 'application/manifest+json' },
{ key: 'cache-control', value: 'public, s-max-age=43200, immutable' },
],
},
{
source: '/feed.json',
headers: [
{ key: 'cache-control', value: 'public, s-max-age=43200, immutable' },
],
},
{
source: '/favicon.ico',
headers: [
{ key: 'cache-control', value: 'public, s-max-age=43200, immutable' },
],
},
{
source: '/atom',
headers: [
{ key: 'cache-control', value: 'public, s-max-age=43200, immutable' },
],
},
{
source: '/sw.js',
headers: [
{ key: 'cache-control', value: 'max-age=0' },
{ key: 'Service-Worker-Allowed', value: '/' },
],
},
],
rewrites: () => [
{
source: '/sw.js',
destination: '/_next/static/sw.js',
},
{
source: '/atom',
destination: '/atom.xml',
},
{
source: '/.well-known/brave-rewards-verification.txt',
destination: '/brave-rewards-verification.txt',
},
{
source: '/manifest.webmanifest',
destination: '/manifest.webmanifest',
},
{
source: '/manifest.json',
destination: '/manifest.webmanifest',
},
],
redirects: () => [
{
source: '/changelog',
statusCode: 301,
destination: 'https://github.com/mcansh/blog/releases',
},
],
env: {
TWITTER: 'loganmcansh',
INSTAGRAM: 'loganmcansh',
Expand Down

1 comment on commit f5ec938

@vercel
Copy link

@vercel vercel bot commented on f5ec938 Jul 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.