mercredi 24 juin 2015

How to server flash policy file with socket-io 1.3.5 (node server)?

I'm trying to serve inline flash policy file on port 3000, but with no luck.

I can not catch any callback from flash policy call (<policy-file-request/>\0). And I don't know how to serve send policy file back to flash through the socket.

Somethig like this: Setting up a socket policy file server from Adobe

This is code from server:

var server   = require('http').createServer();
var io       = require('')(server);

var port = 3000;

var xml = '<?xml version="1.0"?>\n<!DOCTYPE cross-domain-policy SYSTEM \n"">\n<cross-domain-policy>\n';
    xml += '<site-control permitted-cross-domain-policies="master-only"/>\n';
    xml += '<allow-access-from domain="*" to-ports="*"/>\n';
    xml += '</cross-domain-policy>\n';

io.on('connection', function (socket) {
    socket.on('<policy-file-request/>\0', function (data, callback) {
        console.log('socket policy-file-request 0');

server.listen(port, function () {
    info('Server listening at ' + port);

And from client:


Aucun commentaire:

Enregistrer un commentaire