msp*_*ant 5 apache wss websocket
有谁知道我怎么能代理wss连接到ws?
例如:
ProxyPass"wss:// ""ws:// "
解决方案是使用重写规则:
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /(.*) ws://localhost:9001/api/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /(.*) http://localhost:9001/api/$1 [P,L]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2441 次 |
| 最近记录: |