Files
mb-grid-solutions.com/next.config.mjs
Marc Mintel 1e00690dd8
Some checks failed
Build & Deploy / 🔍 Prepare Environment (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 1m23s
Build & Deploy / 🏗️ Build (push) Failing after 1m56s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🔔 Notifications (push) Successful in 2s
fix: umami tracking internationalization
2026-02-09 23:10:27 +01:00

37 lines
1.1 KiB
JavaScript

import withMintelConfig from "@mintel/next-config";
/** @type {import('next').NextConfig} */
const nextConfig = {
async rewrites() {
const umamiUrl =
process.env.UMAMI_API_ENDPOINT ||
process.env.UMAMI_SCRIPT_URL ||
process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL ||
"https://analytics.infra.mintel.me";
const glitchtipUrl = process.env.SENTRY_DSN
? new URL(process.env.SENTRY_DSN).origin
: "https://errors.infra.mintel.me";
return [
{
source: "/stats/:path*",
destination: `${umamiUrl}/:path*`,
},
{
source: "/:locale(de)/stats/:path*",
destination: `${umamiUrl}/:path*`,
},
{
source: "/errors/:path*",
destination: `${glitchtipUrl}/:path*`,
},
{
source: "/:locale(de)/errors/:path*",
destination: `${glitchtipUrl}/:path*`,
},
];
},
};
export default withMintelConfig(nextConfig);