在 https 配置项下如下配置
location = /websocket{ proxy_http_version 1.1; proxy_pass http://websocket; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }
等于号是因为需要精准匹配,以防误伤。根据需要添加。
2023-10-21 22:16:04
在 https 配置项下如下配置
location = /websocket{ proxy_http_version 1.1; proxy_pass http://websocket; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }
等于号是因为需要精准匹配,以防误伤。根据需要添加。