From 26bbeca327ae31abfad9e20bbd00bee85b63091c Mon Sep 17 00:00:00 2001 From: Michael Gallagher Date: Fri, 13 Dec 2019 16:26:35 -0800 Subject: [PATCH] feat(core): use service's port when forwarding to localhost if available --- garden-service/src/proxy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/garden-service/src/proxy.ts b/garden-service/src/proxy.ts index 97ccfa2844..589c78038c 100644 --- a/garden-service/src/proxy.ts +++ b/garden-service/src/proxy.ts @@ -169,7 +169,7 @@ async function createProxy(garden: Garden, log: LogEntry, service: Service, spec }) }) - const localPort = await getPort() + const localPort = await getPort({ port: spec.targetPort }) const host = `localhost:${localPort}` // For convenience, we try to guess a protocol based on the target port, if no URL protocol is specified const protocol = spec.urlProtocol || guessProtocol(spec)