Alternate Flash Policy Port - needs documenting #1011

ADumaine opened this Issue Aug 30, 2012 · 1 comment


None yet

2 participants


Lots of searching through docs and web to find how to configure this with not much success, so here is one solution.

Needed to change the flash policy port from the default 10843 (issues with ISP opening ports). I found information on how to run on another port for the server but still kept getting SecurityError on the client.

In this example the node server is running with SSL and is only used for communication (not feeding up any HTML). The flash policy port has been reconfigured to also listen on port 3300


var fs = require('fs');

var options = {
  key: fs.readFileSync('/etc/ssl/ebscerts/'),
  cert: fs.readFileSync('/etc/ssl/ebscerts/'),
  ca: fs.readFileSync('/etc/ssl/ebscerts/bundle.crt')

var app = require('https').createServer(options, handler)
  , io = require('').listen(app);


//for testing
function handler (req, res) {
    res.end("welcome to ebidnsave\n");

//production settings
io.enable('browser client minification');  // send minified client
io.enable('browser client etag');          // apply etag caching logic based on version number
io.enable('browser client gzip');          // gzip the file
io.set('log level', 1);                              // reduce logging
//io.set('match origin protocol', 'true');
io.set('flash policy port', 3300);       //override policy port  
io.set('transports', [                     // enable all transports (optional if you want flashsocket)
  , 'flashsocket'
  , 'htmlfile'
  , 'xhr-polling'
  , 'jsonp-polling'

Finally realized the client also has to be overridden. This can be done by passing the 'flash policy port' on the io.connect call.


   //socketAddr is server uri  ex.
   var socket = io.connect(socketAddr,{'flash policy port':3300});
   socket.on('connect', function () { .....

The above works with IE9 (seems to work with IE8 with a quick test). BUT there is still a delay in setting up the socket which I think is due to flashsocket trying port 843 first. documentation lists some of the options that can be configured but does not mention 'flash policy port'.
In digging through the file I found on line 1512 of 0.9.10 this list of options that if passed are merged in and override defaults. Not recommending others be changed.

 function Socket (options) {
    this.options = {
        port: 80
      , secure: false
      , document: 'document' in global ? document : false
      , resource: ''
      , transports: io.transports
      , 'connect timeout': 10000
      , 'try multiple transports': true
      , 'reconnect': true
      , 'reconnection delay': 500
      , 'reconnection limit': Infinity
      , 'reopen delay': 3000
      , 'max reconnection attempts': 10
      , 'sync disconnect on unload': false
      , 'auto connect': true
      , 'flash policy port': 10843
      , 'manualFlush': false

    io.util.merge(this.options, options);

It would be nice if this could be added to both and documentation. Hopes this helps...


Hi @ADumaine, I followed the steps you suggest but the browser warns me of the following:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at This can be fixed by moving the resource to the same domain or enabling CORS.

May you help me?

I tried with 3300 and 3006 ports

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment