aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/utils.ts2
-rw-r--r--src/routes/(static)/login/+page.server.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
index bc5df67a..92b602d5 100644
--- a/src/lib/utils.ts
+++ b/src/lib/utils.ts
@@ -178,7 +178,7 @@ export const login = async (
accept: "application/json",
"cf-connecting-ip": ip,
};
- if (host) headers["host"] = host;
+ if (host) headers["x-forwarded-host"] = host;
const res = await fetch(`${base}/login`, {
method: "POST",
diff --git a/src/routes/(static)/login/+page.server.ts b/src/routes/(static)/login/+page.server.ts
index 6c82a209..ce343790 100644
--- a/src/routes/(static)/login/+page.server.ts
+++ b/src/routes/(static)/login/+page.server.ts
@@ -49,7 +49,7 @@ export const actions = {
"content-type": "application/json",
accept: "application/json",
"cf-connecting-ip": request.headers.get("cf-connecting-ip"),
- host: request.headers.get("host"),
+ "x-forwarded-host": request.headers.get("host"),
},
});