We have a need to proxy Meteor through an IIS proxy. An IIS site accepts bindings for a particular Meteor website and proxies the requests through to an alternate port.
Web sockets are not working and Meteor is reverting to XHR.
Web.Config file as follows:
<rule name="Meteor reverse proxy" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{CACHE_URL}" pattern="^(.+)://" />
</conditions>
<action type="Rewrite" url="{C:1}://127.0.0.1:8008/{R:1}" />
</rule>
By accessing the website via 127.0.0.1:8008 on the server it works fine. Accessing the website through the IIS proxy fails.
I have noticed IIS ARR is changing the casing of the headers, removing a header (sec-websocket-extensions) and adding a handful of extras. This might not be related.
IIS Proxy:
Direct:
MS documentation recommends disabling WebSockets when in use alongside NodeJS. Updating this setting does not help. http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support#TOC301258519
Has anyone come across this issue?
Update You'll notice the header above references ARR2.5, this version does not support web sockets. 3.0 is required to proxy sockets.
After testing the proxy via an alternative web socket hello world, ARR was proxying web sockets successfully. To solve the issue we disabled compression on web sockets within Meteor.
SERVER_WEBSOCKET_COMPRESSION environment variable to 0
https://forums.meteor.com/t/websocket-compression-introduced-in-meteor-1-2-doesnt-work-with-passenger-docker-nginx/12025
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With