Skip to content

Commit

Permalink
Allow override of flash socket policy serving port.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbeardsley committed Apr 29, 2011
1 parent 25eee98 commit ac37f8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/socket.io/transports/flashsocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Flashsocket.init = function(listener){
});

try {
netserver.listen(843);
netserver.listen(listener.options.flashPolicyPort || 843);
} catch(e){
if (e.errno == 13)
listener.options.log('Your node instance does not have root privileges. '
Expand Down

2 comments on commit ac37f8b

@3rd-Eden
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

This makes little to no sense at all. The 843 port is a number known to the Flash Player changing that port number renders the whole Flash Policy server useless.. If you don't want to run as root.. Than don't Socket.IO will automatically answer flash policy files inline..

@danielbeardsley
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to get rid of the 3 second delay while still running node as non-root (only root users can listen on ports < 1024). I use iptables to remap external port 843 to a higher internal port that is specified here.

Please sign in to comment.