Moved middleware.

This commit is contained in:
mike 2022-07-07 09:24:32 -07:00
parent ba5c149c48
commit 846afad0a4
4 changed files with 16 additions and 14 deletions

View File

@ -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) {

View File

@ -8,9 +8,7 @@ module.exports = {
updatesDisabled: process.env.DISABLE_UPDATES,
},
basePath: process.env.BASE_PATH,
experimental: {
outputStandalone: true,
},
output: 'standalone',
eslint: {
ignoreDuringBuilds: true,
},

View File

@ -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",

View File

@ -1271,10 +1271,10 @@
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.2.0.tgz#17ce2d9f5532b677829840037e06f208b7eed66b"
integrity sha512-/FCkDpL/8SodJEXvx/DYNlOD5ijTtkozf4PPulYPtkPOJaMPpBSOkzmsta4fnrnbdH6eZjbwbiXFdr6gSQCV4w==
"@next/eslint-plugin-next@12.1.6":
version "12.1.6"
resolved "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.1.6.tgz"
integrity sha512-yNUtJ90NEiYFT6TJnNyofKMPYqirKDwpahcbxBgSIuABwYOdkGwzos1ZkYD51Qf0diYwpQZBeVqElTk7Q2WNqw==
"@next/eslint-plugin-next@12.2.0":
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"