Fix for connecting to container Cline

W/out these 2 lines you'll get the following error (or similar) while trying to connect to a container in portainer's web ui:

> WebSocket connection to 'wss://<domain>/portainer/api/websocket/exec?token=<token>=6&id=<id>&nodeName=docker-desktop' failed: Error during WebSocket handshake: Unexpected response code: 400
This commit is contained in:
J. Scott Elblein 2020-09-09 23:02:25 -05:00 committed by GitHub
commit 8f8d95670f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,5 +36,7 @@ location ^~ /portainer/api/websocket/ {
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
rewrite /portainer(.*) $1 break;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_hide_header X-Frame-Options; # Possibly not needed after Portainer 1.20.0
}