fix(gateway): keep production app ports private

This commit is contained in:
2026-07-19 22:24:28 +05:30
parent 5ce45b4973
commit 33730c68ab
4 changed files with 30 additions and 1 deletions
+3
View File
@@ -337,6 +337,9 @@ export async function startGateway(opts: GatewayOptions): Promise<RunningGateway
env: {
...process.env,
PORT: String(appPort),
// App ports are private gateway internals. Loopback prevents
// clients from bypassing gateway auth and edge middleware.
WRNEXUS_HOSTNAME: "127.0.0.1",
WRNEXUS_ENV: environment,
WRNEXUS_APP_NAME: app.name,
WRNEXUS_APP_ORIGIN: app.publicOrigin ?? `http://${app.domains[0]}:${port}`,