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

Support Flash websocket policy #1

Open
abl opened this issue May 25, 2013 · 0 comments
Open

Support Flash websocket policy #1

abl opened this issue May 25, 2013 · 0 comments

Comments

@abl
Copy link

abl commented May 25, 2013

Earlier today I needed to test some changes in IE8 and really did not want to give up LiveReload.

I was able to glue https://github.com/gimite/web-socket-js together with LiveReload...and it worked surprisingly well. I had to run a separate websocket policy server (and add the necessary JS/SWF to the page from web-socket-js) in order to get it working, though. Great explanation of the problem at http://www.lightsphere.com/dev/articles/flash_socket_policy.html - basically, Flash will send <policy-file-request/> as a string to port 843 and then to the websocket port. It expects a policy in return such as:

<cross-domain-policy>
     <allow-access-from domain="*" to-ports="35729" />
</cross-domain-policy>

At that point this workaround works more or less as a real WebSocket does - enough for LiveReload to function, at least for me. :)

There's actually already an implementation of a Flash policy server in node.js if that helps: https://github.com/3rd-Eden/FlashPolicyFileServer

Thanks for saving me hours of jamming on the F5 key!

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

No branches or pull requests

1 participant