Skip to content

Commit

Permalink
feat(core): use service's port when forwarding to localhost if available
Browse files Browse the repository at this point in the history
  • Loading branch information
mjgallag authored and edvald committed Dec 14, 2019
1 parent e237fdf commit 26bbeca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion garden-service/src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 26bbeca

Please sign in to comment.