refactor(gateway): share host header parsing

This commit is contained in:
Peter Steinberger
2026-02-15 16:15:53 +00:00
parent 933a9945ae
commit 1843bcf1db
5 changed files with 24 additions and 56 deletions

View File

@@ -33,6 +33,7 @@ import {
import { authorizeGatewayConnect, isLocalDirectRequest } from "../../auth.js";
import { buildDeviceAuthPayload } from "../../device-auth.js";
import { isLoopbackAddress, isTrustedProxyAddress, resolveGatewayClientIp } from "../../net.js";
import { resolveHostName } from "../../net.js";
import { resolveNodeCommandAllowlist } from "../../node-command-policy.js";
import { checkBrowserOrigin } from "../../origin-check.js";
import { GATEWAY_CLIENT_IDS } from "../../protocol/client-info.js";
@@ -58,11 +59,7 @@ import {
incrementPresenceVersion,
refreshGatewayHealthSnapshot,
} from "../health-state.js";
import {
formatGatewayAuthFailureMessage,
resolveHostName,
type AuthProvidedKind,
} from "./auth-messages.js";
import { formatGatewayAuthFailureMessage, type AuthProvidedKind } from "./auth-messages.js";
type SubsystemLogger = ReturnType<typeof createSubsystemLogger>;