Merged in feat/sentry (pull request #1089)

This commit is contained in:
Linus Flood
2024-12-19 10:35:20 +00:00
committed by Joakim Jäderberg
parent e0c5b59860
commit 3982b1ba56
32 changed files with 2715 additions and 429 deletions

View File

@@ -1,4 +1,4 @@
import { NextResponse } from "next/server"
import { type NextMiddleware, NextResponse } from "next/server"
import { notFound } from "@/server/errors/next"
@@ -7,9 +7,7 @@ import { removeTrailingSlash } from "@/utils/url"
import { fetchAndCacheEntry, getDefaultRequestHeaders } from "./utils"
import type { NextMiddleware } from "next/server"
import { MiddlewareMatcher } from "@/types/middleware"
import type { MiddlewareMatcher } from "@/types/middleware"
export const middleware: NextMiddleware = async (request) => {
const { nextUrl } = request

View File

@@ -1,10 +1,10 @@
import { NextMiddleware, NextResponse } from "next/server"
import { type NextMiddleware, NextResponse } from "next/server"
import { MiddlewareMatcher } from "@/types/middleware"
import type { MiddlewareMatcher } from "@/types/middleware"
/*
/*
Middleware function to normalize date formats to support
YYYY-MM-D and YYYY-MM-DD since the current web uses YYYY-MM-D
YYYY-MM-D and YYYY-MM-DD since the current web uses YYYY-MM-D
in the URL as parameters (toDate and fromDate)
*/
const legacyDatePattern = /^([12]\d{3}-(0[1-9]|1[0-2])-([1-9]))$/