mirror of https://github.com/portainer/portainer
fix(agent/console): fix an issue with the agent console on Docker environments (#4169)
parent
b8f8c75380
commit
747fdae269
|
@ -33,9 +33,12 @@ func (handler *Handler) proxyEdgeAgentWebsocketRequest(w http.ResponseWriter, r
|
||||||
}
|
}
|
||||||
|
|
||||||
func (handler *Handler) proxyAgentWebsocketRequest(w http.ResponseWriter, r *http.Request, params *webSocketRequestParams) error {
|
func (handler *Handler) proxyAgentWebsocketRequest(w http.ResponseWriter, r *http.Request, params *webSocketRequestParams) error {
|
||||||
// TODO: k8s merge - make sure this is still working with Docker agent
|
endpointURL := params.endpoint.URL
|
||||||
//agentURL, err := url.Parse(params.endpoint.URL)
|
if params.endpoint.Type == portainer.AgentOnKubernetesEnvironment {
|
||||||
agentURL, err := url.Parse(fmt.Sprintf("http://%s", params.endpoint.URL))
|
endpointURL = fmt.Sprintf("http://%s", params.endpoint.URL)
|
||||||
|
}
|
||||||
|
|
||||||
|
agentURL, err := url.Parse(endpointURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue