紧要 nginx 增加以下配置: proxy_http_version 1.1; proxy_set_header X-Forwarded-Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade; proxy_set_header Accept-Encoding gzip; 详见链接: GO