Fix build errors

This commit is contained in:
Darren Clarke 2025-02-13 10:15:38 +01:00
parent 5a1be0de94
commit 5ff5eb4213
2 changed files with 492 additions and 2279 deletions

View file

@ -1,7 +1,6 @@
import { NextResponse } from "next/server";
import { withAuth, NextRequestWithAuth } from "next-auth/middleware";
/*
const rewriteURL = (
request: NextRequestWithAuth,
originBaseURL: string,
@ -28,7 +27,7 @@ const rewriteURL = (
request: { headers: requestHeaders },
});
};
*/
const checkRewrites = async (request: NextRequestWithAuth) => {
const linkBaseURL = process.env.LINK_URL ?? "http://localhost:3000";
const zammadURL = process.env.ZAMMAD_URL ?? "http://zammad-nginx:8080";
@ -111,6 +110,7 @@ const checkRewrites = async (request: NextRequestWithAuth) => {
return response;
};
}
export default withAuth(checkRewrites, {
callbacks: {
@ -143,4 +143,4 @@ export const config = {
matcher: [
"/((?!ws|wss|api/signal|api/whatsapp|_next/static|_next/image|favicon.ico).*)",
],
};
}