Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can you provide an example of using connect-gzip middle ware with proxy table #212

Closed
haohello opened this issue Mar 18, 2012 · 6 comments
Closed
Labels

Comments

@haohello
Copy link

the only example for now I can find is the basic server with connect-gzip middle ware, thank you for your hard work.

@coderarity
Copy link
Contributor

Yeah, I'll make a pull request for it.

@haohello
Copy link
Author

Also, can you confirm that node-http-proxy works with socket.io flash transport? I was testing with IE for a site behind your http-proxy, it was complaining that the flash security policy file cannot be found, any ideas to work around this issue?

@coderarity
Copy link
Contributor

From what I've read, Flash requires a socket policy to connect to the server. It should request for this on TCP port 843. You could try hosting this socket policy file on the proxy server (or proxy it to the Socket.io if it's an HTTP request).

You can read more about hosting socket policy file severs here.

On Friday, March 30, 2012 at 4:25 AM, haohello wrote:

Also, can you confirm that node-http-proxy works with socket.io flash transport? I was testing with IE for a site behind your http-proxy, it was complaining that the flash security policy file cannot be found, any ideas to work around this issue?


Reply to this email directly or view it on GitHub:
#212 (comment)

@haohello
Copy link
Author

Hi there, thanks for prompt reply, from what I've found on both adobe website and socket io site, the default flash policy server is serving on port 843 the same as what you've observed, however there is a three-second timeout setting of requesting the policy file on port 843 of the server, if the browser cannot get the policy file after 3 second timeout, it'll resort to the default port of the server that you're requesting.

I tried to serve the policy file on port 843 and also the port 10843 (this is a default policy server port setting in socket.io), and it'll surely resolve my problem in this case, unfortunately this would create another problem, as usually is the case that major firewall software would block port 843 and 10843 (I've tested this on several of my computers here),

Since after the timeout the browser will try to request the policy file on the default requested port, as for all my socket.io apps, I'm using http-proxy for the reverse proxy and this http-proxy is listening on port 80, so I think it would be better off if we could serve the flash policy file on port 80 on the reverse proxy side, other than port 843 as which would normally be blocked and prevent the user from using the site any more.

@coderarity
Copy link
Contributor

The thing is, if the request isn't on an HTTP or WebSocket protocol, I don't think it will be forwarded. I think that the policy file server doesn't use these protocols, but I'm not sure about that.

@haohello
Copy link
Author

There is this npm package that may be able to give you some hints on how to work around, https://github.com/3rd-Eden/FlashPolicyFileServer

Also how the socket.io is using this package in its flash socket source is also a good pointer on this.
https://github.com/LearnBoost/socket.io/blob/master/lib/transports/flashsocket.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants