1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

fix(edge) EE-1720 activate tunnel and remove proxy cache when needed (#5775)

Co-authored-by: Simon Meng <simon.meng@portainer.io>
This commit is contained in:
cong meng 2021-10-15 18:13:20 +13:00 committed by GitHub
parent 588ce549ad
commit 41999e149f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 99 additions and 101 deletions

View file

@ -12,7 +12,10 @@ import (
)
func (handler *Handler) proxyEdgeAgentWebsocketRequest(w http.ResponseWriter, r *http.Request, params *webSocketRequestParams) error {
tunnel := handler.ReverseTunnelService.GetTunnelDetails(params.endpoint.ID)
tunnel, err := handler.ReverseTunnelService.GetActiveTunnel(params.endpoint)
if err != nil {
return err
}
endpointURL, err := url.Parse(fmt.Sprintf("http://127.0.0.1:%d", tunnel.Port))
if err != nil {