nginx之websocket(十四)
2021-01-02 05:28
标签:socket soc pre sock pass proxy http serve connect nginx之websocket(十四) 标签:socket soc pre sock pass proxy http serve connect 原文地址:https://www.cnblogs.com/pengsn/p/13671129.htmlwebsocket 配置
map $http_upgrade $connection_upgrade {
default upgrade;
‘‘ close;
}
server {
listen 80;
server_name localhost;
location /ws {
proxy_pass xxx;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
上一篇:Http请求中如何保持状态?
下一篇:Dva.js 入门级教学文档-2
文章标题:nginx之websocket(十四)
文章链接:http://soscw.com/index.php/essay/39508.html