Skip to content

Commit

Permalink
添加对 WebSocket 的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
yanhao98 committed Dec 14, 2024
1 parent db91fa0 commit 6914584
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rootfs/etc/nginx/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,10 @@ server {
proxy_pass http://127.0.0.1:7080; # 7080 对应的是 entry.sh 的 --vhost_http_port
proxy_set_header Host $http_host;
# proxy_set_header X-Real-IP $remote_addr;

# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}

0 comments on commit 6914584

Please sign in to comment.