diff options
| author | Adam Soltys <[email protected]> | 2026-02-06 17:24:28 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-06 17:24:28 +0000 |
| commit | e03bc9bd0d7360899c5649caca6dc832181ac0dc (patch) | |
| tree | 710216a85d1ff6c24487b4adc9da0fdc36b3b9c7 /src | |
| parent | 8ec5dda44f4676a2e5dae609792710b0719cec43 (diff) | |
| download | coinos-ui-e03bc9bd0d7360899c5649caca6dc832181ac0dc.tar.gz coinos-ui-e03bc9bd0d7360899c5649caca6dc832181ac0dc.zip | |
forward host header
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/utils.ts | 2 | ||||
| -rw-r--r-- | src/routes/(static)/login/+page.server.ts | 2 |
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"), }, }); |
