This commit is contained in:
2026-07-10 21:52:36 +02:00
parent bb528d6ef9
commit 671c1a1559
28 changed files with 6396 additions and 5561 deletions

View File

@@ -34,66 +34,68 @@ const nextConfig = {
pagesBufferLength: 2,
},
poweredByHeader: false,
webpack: (config, { dev }) => {
if (!dev && isWslOnWindowsMount()) {
config.cache = {
type: 'filesystem',
cacheDirectory: path.join(os.tmpdir(), 'qrmaster-next-webpack-cache'),
webpack: (config, { dev }) => {
if (!dev && isWslOnWindowsMount()) {
config.cache = {
type: 'filesystem',
cacheDirectory: path.join(os.tmpdir(), 'qrmaster-next-webpack-cache'),
};
}
return config;
},
async headers() {
const longCacheHeaders = [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
];
return [
{ source: '/favicon1.png', headers: longCacheHeaders },
{ source: '/favicon.svg', headers: longCacheHeaders },
{ source: '/favicon.ico', headers: longCacheHeaders },
{ source: '/logo.svg', headers: longCacheHeaders },
{ source: '/producthunt-featured.svg', headers: longCacheHeaders },
];
},
async redirects() {
return [
// SEO Cannibalization Redirects
{
source: '/tools/teams-qr-code',
destination: '/blog/microsoft-teams-qr-code',
permanent: true,
},
{
source: '/dynamic-barcode-generator',
destination: '/tools/barcode-generator',
permanent: true,
},
{
source: '/barcode-generator',
destination: '/tools/barcode-generator',
permanent: true,
},
{
source: '/blog/qr-code-analytics',
destination: '/qr-code-analytics',
permanent: true,
},
{
source: '/use-cases/restaurant-menu-qr-codes',
destination: '/restaurants',
permanent: true,
},
{
source: '/blog/qr-code-restaurant-menu',
destination: '/restaurants',
permanent: true,
},
return config;
},
async headers() {
const longCacheHeaders = [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
];
return [
{ source: '/favicon1.png', headers: longCacheHeaders },
{ source: '/favicon.svg', headers: longCacheHeaders },
{ source: '/favicon.ico', headers: longCacheHeaders },
{ source: '/logo.svg', headers: longCacheHeaders },
{ source: '/producthunt-featured.svg', headers: longCacheHeaders },
];
},
async redirects() {
return [
// German home lives at /qr-code-erstellen (established ranking page);
// /de only hosts the German subpages.
{
source: '/de',
destination: '/qr-code-erstellen',
permanent: true,
},
// SEO Cannibalization Redirects
{
source: '/dynamic-barcode-generator',
destination: '/tools/barcode-generator',
permanent: true,
},
{
source: '/barcode-generator',
destination: '/tools/barcode-generator',
permanent: true,
},
{
source: '/blog/qr-code-analytics',
destination: '/qr-code-analytics',
permanent: true,
},
{
source: '/use-cases/restaurant-menu-qr-codes',
destination: '/restaurants',
permanent: true,
},
{
source: '/blog/qr-code-restaurant-menu',
destination: '/restaurants',
permanent: true,
},
{
source: '/create-qr',
destination: '/dynamic-qr-code-generator',