diff --git a/src/lib/origin/server.ts b/src/lib/origin/server.ts index 3e6fd5b..90e63f4 100644 --- a/src/lib/origin/server.ts +++ b/src/lib/origin/server.ts @@ -4,7 +4,11 @@ import "server-only"; export async function getOrigin(): Promise<{ protocol: string; host: string }> { const h = await headers(); const host = process.env.ORIGIN || h.get(":authority") || "localhost:3000"; - const protocol = h.get("x-forwarded-proto") || h.get(":scheme") || "https"; + const protocol = + process.env.ORIGIN_PROTO || + h.get("x-forwarded-proto") || + h.get(":scheme") || + "https"; return { protocol, host }; }