mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Let port-forwarding support custom http(s) port (#5084)
This commit is contained in:
@@ -40,8 +40,13 @@ const (
|
||||
)
|
||||
|
||||
func (api *API) appHost(rw http.ResponseWriter, r *http.Request) {
|
||||
host := api.AppHostname
|
||||
if api.AccessURL.Port() != "" {
|
||||
host += fmt.Sprintf(":%s", api.AccessURL.Port())
|
||||
}
|
||||
|
||||
httpapi.Write(r.Context(), rw, http.StatusOK, codersdk.GetAppHostResponse{
|
||||
Host: api.AppHostname,
|
||||
Host: host,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user