mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
Get config domain from env var
This commit is contained in:
@@ -4,8 +4,8 @@ import { getFiefAuthMiddleware } from "./app/lib/fief";
|
|||||||
import { getConfig } from "./app/lib/edgeConfig";
|
import { getConfig } from "./app/lib/edgeConfig";
|
||||||
|
|
||||||
export async function middleware(request: NextRequest) {
|
export async function middleware(request: NextRequest) {
|
||||||
const domain = request.nextUrl.hostname;
|
const hostname = new URL(process.env.NEXT_PUBLIC_SITE_URL!).hostname;
|
||||||
const config = await getConfig(domain);
|
const config = await getConfig(hostname);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
request.nextUrl.pathname.match(
|
request.nextUrl.pathname.match(
|
||||||
|
|||||||
Reference in New Issue
Block a user