Add policyfile server #19

Closed
wants to merge 3 commits into from

3 participants

@nicokaiser

Don't know if this is a good idea. However this is optional, only if options.policyPort is set.

Maybe instead of server.handleSocket, policyfile could be used (however policyfile seems to grab all 'error' and 'data' events, so the current solution is a bit nicer)...

@rauchg

The reason I didn't want to go with a policy server is that you would probably run it standalone, outside of engine.io, right?

@nicokaiser

Yeah, you're right...

@nicokaiser nicokaiser closed this Apr 6, 2012
@3rd-Eden 3rd-Eden and 1 other commented on an outdated diff Apr 6, 2012
lib/engine.io.js
@@ -4,6 +4,7 @@
*/
var http = require('http')
+ , policyfile = require('policyfile')
@3rd-Eden
3rd-Eden added a note Apr 6, 2012

i would lazy require this when the options.policyPort has been set.

Ok, sounds good. And remove "polifyfile" from the dependencies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@nicokaiser nicokaiser reopened this Apr 6, 2012
@3rd-Eden

@guille then you shouldn't support the websocket-js library either as it depends on having a policy file server

@rauchg

@3rd-Eden We have a policy file in lib/transports/

@rauchg

We're not doing this. If someone needs a policy server they should set up their own standalone, where they could also handle non-engine related Flash security policies.

We also added a policyPort option to engine.io-client to facilitate this.

@rauchg rauchg closed this Jul 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment