get host right

This commit is contained in:
Max Peintner
2025-02-03 09:12:02 +01:00
parent e2c74bb910
commit c683613633

View File

@@ -69,7 +69,7 @@ export function getServiceUrlFromHeaders(headers: ReadonlyHeaders): {
if (host) { if (host) {
const [hostname, port] = host.split(":"); const [hostname, port] = host.split(":");
if (hostname !== "localhost") { if (hostname !== "localhost") {
instanceUrl = host; instanceUrl = host.startsWith("https://") ? host : `https://${host}`;
} }
} }
} }