Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Moved middleware.
mike846afad0a4f2
diff --git a/pages/_middleware.js b/middleware.jssimilarity index 92%rename from pages/_middleware.jsrename to middleware.jsindex ee97c8f4e..cf957b746 100644--- a/pages/_middleware.js+++ b/middleware.js@@ -1,5 +1,9 @@import { NextResponse } from 'next/server';+export const config = {+ matcher: '/:path*',+};+function customCollectEndpoint(req) {const collectEndpoint = process.env.COLLECT_API_ENDPOINT;@@ -37,7 +41,7 @@ function forceSSL(req, res) {return res;}-export function middleware(req) {+export default function middleware(req) {const fns = [customCollectEndpoint, customScriptName];for (const fn of fns) {diff --git a/next.config.js b/next.config.jsindex 8936812bf..f8186f3a4 100644--- a/next.config.js+++ b/next.config.js@@ -8,9 +8,7 @@ module.exports = {updatesDisabled: process.env.DISABLE_UPDATES,},basePath: process.env.BASE_PATH,- experimental: {- outputStandalone: true,- },+ output: 'standalone',eslint: {ignoreDuringBuilds: true,},diff --git a/package.json b/package.jsonindex b701d3910..556f5e8ff 100644--- a/package.json+++ b/package.json@@ -105,7 +105,7 @@"@svgr/webpack": "^6.2.1","cross-env": "^7.0.3","eslint": "^7.32.0",- "eslint-config-next": "^12.0.1",+ "eslint-config-next": "^12.2.0","eslint-config-prettier": "^8.5.0","eslint-plugin-prettier": "^4.0.0","extract-react-intl-messages": "^4.1.1",diff --git a/yarn.lock b/yarn.lockindex b144e73a7..717e12276 100644--- a/yarn.lock+++ b/yarn.lock@@ -1271,10 +1271,10 @@resolved "https://registry.yarnpkg.com/@next/env/-/env-12.2.0.tgz#17ce2d9f5532b677829840037e06f208b7eed66b"integrity sha512-/FCkDpL/8SodJEXvx/DYNlOD5ijTtkozf4PPulYPtkPOJaMPpBSOkzmsta4fnrnbdH6eZjbwbiXFdr6gSQCV4w==-"@next/[email protected]":- version "12.1.6"- resolved "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.1.6.tgz"- integrity sha512-yNUtJ90NEiYFT6TJnNyofKMPYqirKDwpahcbxBgSIuABwYOdkGwzos1ZkYD51Qf0diYwpQZBeVqElTk7Q2WNqw==+"@next/[email protected]":+ version "12.2.0"+ resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-12.2.0.tgz#38b36d3be244cc9a98c0e7d203bdb062f87df4ac"+ integrity sha512-nIj5xV/z3dOfeBnE7qFAjUQZAi4pTlIMuusRM6s/T6lOz8x7mjY5s1ZkTUBmcjPVCb2VIv3CrMH0WZL6xfjZZg==dependencies:glob "7.1.7"@@ -2924,12 +2924,12 @@ escape-string-regexp@^4.0.0:resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz"integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==-eslint-config-next@^12.0.1:- version "12.1.6"- resolved "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-12.1.6.tgz"- integrity sha512-qoiS3g/EPzfCTkGkaPBSX9W0NGE/B1wNO3oWrd76QszVGrdpLggNqcO8+LR6MB0CNqtp9Q8NoeVrxNVbzM9hqA==+eslint-config-next@^12.2.0:+ version "12.2.0"+ resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-12.2.0.tgz#f7e965ca616ebd948d728905c58a1c80aabb36b9"+ integrity sha512-QWzNegadFXjQ0h3hixnLacRM9Kot85vQefyNsA8IeOnERZMz0Gvays1W6DMCjSxJbnCwuWaMXj9DCpar5IahRA==dependencies:- "@next/eslint-plugin-next" "12.1.6"+ "@next/eslint-plugin-next" "12.2.0""@rushstack/eslint-patch" "^1.1.3""@typescript-eslint/parser" "^5.21.0"eslint-import-resolver-node "^0.3.6"