host change everywhere

This commit is contained in:
Max Peintner
2025-01-28 09:47:35 +01:00
parent 44bb8588de
commit d378c6504e
35 changed files with 187 additions and 52 deletions

View File

@@ -1,5 +1,6 @@
import { DynamicTheme } from "@/components/dynamic-theme";
import { RegisterForm } from "@/components/register-form";
import { getApiUrlOfHeaders } from "@/lib/service";
import {
getBrandingSettings,
getDefaultOrg,
@@ -21,7 +22,9 @@ export default async function Page(props: {
let { firstname, lastname, email, organization, authRequestId } =
searchParams;
const host = (await headers()).get("host");
const _headers = await headers();
const instanceUrl = getApiUrlOfHeaders(_headers);
const host = instanceUrl;
if (!host || typeof host !== "string") {
throw new Error("No host found");