Refactor getConfig calls

This commit is contained in:
2024-09-02 12:16:06 +02:00
parent e01a4dbd9a
commit b84efd1c61
6 changed files with 9 additions and 11 deletions

View File

@@ -4,8 +4,7 @@ import { getFiefAuthMiddleware } from "./app/lib/fief";
import { getConfig } from "./app/lib/edgeConfig";
export async function middleware(request: NextRequest) {
const hostname = new URL(process.env.NEXT_PUBLIC_SITE_URL!).hostname;
const config = await getConfig(hostname);
const config = await getConfig();
if (
request.nextUrl.pathname.match(