【发布时间】:2016-03-01 09:58:32
【问题描述】:
我有以下适用于 chrome 和 Internet Explorer 的 apache2 配置:
Listen 80
IncludeOptional conf.d/*.conf
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
<VirtualHost *:80>
#ProxyRequests On
ProxyPass / http://IP:8585/
ProxyPassReverse / http://IP:8585/
ProxyPass /call ws://IP:8585/call
ProxyPassReverse /call ws://IP:8585/call
ProxyPass /call/ ws://IP:8585/call/
ProxyPassReverse /call/ ws://IP:8585/call/
RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule .* ws://localhost:8585%{REQUEST_URI} [P]
</VirtualHost>
问题是它不能通过 firefox 工作。
我看到的唯一区别是 Firefox 发送 Connection: keep-alive, Upgrade 而不是简单的 Upgrade。
我需要更改我的重写规则吗?
【问题讨论】: