站点图标 Lee's Blog

next-terminal配置反向代理后无法连接资产

现象

添加ssh资产后提示”websocket error undefined”,或提示”远程服务未找到”

解决方法

在nginx中添加重要的两个配置

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;

参考

官方gitee中的issues:https://gitee.com/dushixiang/next-terminal/issues/I681GH

官方文档配置Nginx:https://next-terminal.typesafe.cn/docs/install/reverse-proxy.html

退出移动版