一般是反代后添加HTTPS后产生的本问题。

宝塔环境下直接在网站配置文件添加下列代码即可。

其他环境自行添加至nginx配置文件中

location /
{
    proxy_pass http://127.0.0.1:8008;
    proxy_set_header Host $host;
}
location /ws
{
    proxy_pass http://127.0.0.1:8008;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
}
Last modification:January 27, 2024
如果觉得我的文章对你有用,请随意赞赏