{"_id":"policyfile","_rev":"31-a80a14087789dab0c19f64fceb6ceb4f","name":"policyfile","description":"Flash Socket Policy File Server. A server to respond to Flash Socket Policy requests, both inline and through a dedicated server instance.","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"policyfile","version":"0.0.1","author":{"name":"Arnout Kazemier"},"description":"Flash Socket Policy File Server. A server to respond to Flash Socket Policy requests, both inline and through a dedicated server instance.  ","main":"index","keywords":["flash","socket","policy","file","server","Flash Socket Policy File Server","cross domain"],"directories":{"lib":"./lib"},"maintainers":[{"name":"Arnout Kazemier","email":"info@3rd-Eden.com","url":"http://www.3rd-Eden.com"}],"licenses":[{"type":"MIT","url":"https://github.com/3rd-Eden/FlashPolicyFileServer/blob/master/LICENSE"}],"repositories":[{"type":"git","url":"https://github.com/3rd-Eden/FlashPolicyFileServer.git"}],"_id":"policyfile@0.0.1","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.10","_nodeVersion":"v0.4.7","dist":{"shasum":"ba53eee3977a05a2810daf44783abb81a95824be","tarball":"https://registry.npmjs.org/policyfile/-/policyfile-0.0.1.tgz","integrity":"sha512-vpO1EXSj5FPrfvjtALhNayE7f1AiDw+QuHt7ZbN3A+N9D1xG7r4fxaAijGrd1pVWrGyTYJBBIcJ9BnSeHg1iPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9jJSL2lRuc7oM/tb+ByDKmexcrjnJtWua/VTcRC+w3QIhALMHDytmm9exxqoq/PImYA2QiEUuSke+/RB7X3UtnP3y"}]}},"0.0.2":{"name":"policyfile","version":"0.0.2","author":{"name":"Arnout Kazemier"},"description":"Flash Socket Policy File Server. A server to respond to Flash Socket Policy requests, both inline and through a dedicated server instance.  ","main":"index","keywords":["flash","socket","policy","file","server","Flash Socket Policy File Server","cross domain"],"directories":{"lib":"./lib"},"maintainers":[{"name":"Arnout Kazemier","email":"info@3rd-Eden.com","url":"http://www.3rd-Eden.com"}],"licenses":[{"type":"MIT","url":"https://github.com/3rd-Eden/FlashPolicyFileServer/blob/master/LICENSE"}],"repositories":[{"type":"git","url":"https://github.com/3rd-Eden/FlashPolicyFileServer.git"}],"_id":"policyfile@0.0.2","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.12","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"f46c9d1b7591adbdfb900bc4cf2a591dd139450f","tarball":"https://registry.npmjs.org/policyfile/-/policyfile-0.0.2.tgz","integrity":"sha512-xuIlV60izZOHyb692w1wZOWcpA74mjzdQKvGC4JjtJQDhTTE78KZ8G/8ZKJgz5n9GypaEjKMLIT+oYHDH32AuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAxYzQKoomw0pR/G4xRj+s4lc1WZoOFaHFFdg8z1CpFAAiEAycugtvWUnf/qj0VaTHyUujKdT5mOMltO27/WQymF3Ko="}]},"scripts":{}},"0.0.3":{"name":"policyfile","version":"0.0.3","author":{"name":"Arnout Kazemier"},"description":"Flash Socket Policy File Server. A server to respond to Flash Socket Policy requests, both inline and through a dedicated server instance.  ","main":"index","keywords":["flash","socket","policy","file","server","Flash Socket Policy File Server","cross domain"],"directories":{"lib":"./lib"},"maintainers":[{"name":"Arnout Kazemier","email":"info@3rd-Eden.com","url":"http://www.3rd-Eden.com"}],"licenses":[{"type":"MIT","url":"https://github.com/3rd-Eden/FlashPolicyFileServer/blob/master/LICENSE"}],"repositories":[{"type":"git","url":"https://github.com/3rd-Eden/FlashPolicyFileServer.git"}],"_npmJsonOpts":{"file":"/Users/arnout/.npm/policyfile/0.0.3/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"policyfile@0.0.3","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.13","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"d78b39879f585e8ffb964d468127e2386fd68c74","tarball":"https://registry.npmjs.org/policyfile/-/policyfile-0.0.3.tgz","integrity":"sha512-7UcohwONnngLXWsTVUK/fCRz75gQEWj+6x8UEvE9yaDwUgqgO7qiolZtJlrrkmPBl9s8Ik6eUFysV6+wDhuUcg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD03x0f0MAEXflK78RIaQcf6LqYawWphXwzhEcYlwATeQIgC3ngbzcldTaba7Z+3R6cMiTbZXU+p4MH0VFsWgliUdo="}]},"scripts":{}},"0.0.4":{"name":"policyfile","version":"0.0.4","author":{"name":"Arnout Kazemier"},"description":"Flash Socket Policy File Server. A server to respond to Flash Socket Policy requests, both inline and through a dedicated server instance.","main":"index","keywords":["flash","socket","policy","file","server","Flash Socket Policy File Server","cross domain"],"directories":{"lib":"./lib"},"maintainers":[{"name":"Arnout Kazemier","email":"info@3rd-Eden.com","url":"http://blog.3rd-Eden.com"}],"licenses":[{"type":"MIT","url":"https://github.com/3rd-Eden/FlashPolicyFileServer/blob/master/LICENSE"}],"repositories":[{"type":"git","url":"https://github.com/3rd-Eden/FlashPolicyFileServer.git"}],"_id":"policyfile@0.0.4","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.12","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"d6b82ead98ae79ebe228e2daf5903311ec982e4d","tarball":"https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz","integrity":"sha512-UfDtlscNialXfmVEwEPm0t/5qtM0xPK025eYWd/ilv89hxLIhVQmt3QIzMHincLO2MBtZyww0386pt13J4aIhQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA0u16JfJ/fi4GA/KG4ARRuJDPeQenSG9wQlxw13VIMHAiAqHK9QE8ZZ8LLabsA1tYa6OfbFEXKrMXLirBVGYhbxLw=="}]},"scripts":{}},"0.0.5":{"name":"policyfile","version":"0.0.5","author":{"name":"Arnout Kazemier"},"description":"Flash Socket Policy File Server. A server to respond to Flash Socket Policy requests, both inline and through a dedicated server instance.","main":"index","keywords":["flash","socket","policy","file","server","Flash Socket Policy File Server","cross domain"],"directories":{"lib":"./lib"},"maintainers":[{"name":"V1","email":"info@3rd-Eden.com"}],"license":{"type":"MIT","url":"https://github.com/3rd-Eden/FlashPolicyFileServer/blob/master/LICENSE"},"repository":{"type":"git","url":"git://github.com/3rd-Eden/FlashPolicyFileServer.git"},"_npmUser":{"name":"V1","email":"info@3rd-Eden.com"},"_id":"policyfile@0.0.5","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.101","_nodeVersion":"v0.5.10","_defaultsLoaded":true,"dist":{"shasum":"67afb4b15c90951663cfe75006df036683fad06f","tarball":"https://registry.npmjs.org/policyfile/-/policyfile-0.0.5.tgz","integrity":"sha512-OxiH3BB8c7paozxLmwJ5fPK6NJr/gPMQ5+fjfAhBnJY+EnZkFMwH/fxyKjXOtuGqKMBdN52UL+7tBfN6sXMUuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtPyUu957B7tOlk7BZNNna6Dgpb6v0DI+J2GzCMlt4rQIgRwBPxw6y2UJ5ln1QML6BaZrrrNPap6HVRLQaSkSqOEw="}]}},"0.0.6":{"name":"policyfile","version":"0.0.6","author":{"name":"Arnout Kazemier"},"description":"Flash Socket Policy File Server. A server to respond to Flash Socket Policy requests, both inline and through a dedicated server instance.","keywords":["flash","socket","policy","file","server","Flash Socket Policy File Server","cross domain"],"maintainers":[{"name":"v1","email":"info@3rd-Eden.com"},{"name":"3rdeden","email":"npm@3rd-Eden.com"}],"license":{"type":"MIT","url":"https://github.com/3rd-Eden/FlashPolicyFileServer/blob/master/LICENSE"},"repository":{"type":"git","url":"git+https://github.com/3rd-Eden/FlashPolicyFileServer.git"},"gitHead":"a3ad25396a63db58afff8d1c1358e1f30458ec37","bugs":{"url":"https://github.com/3rd-Eden/FlashPolicyFileServer/issues"},"homepage":"https://github.com/3rd-Eden/FlashPolicyFileServer#readme","_id":"policyfile@0.0.6","scripts":{},"_shasum":"8689b44c4f42269ee74cf22892aee5995ecf023d","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"dist":{"shasum":"8689b44c4f42269ee74cf22892aee5995ecf023d","tarball":"https://registry.npmjs.org/policyfile/-/policyfile-0.0.6.tgz","integrity":"sha512-1/I52idR1lB9GdPVRLJp9waxsdsliTgf/oNNvzTF86GQd+zR2r+fbAdZjwiGBiCzLiBrwUdtn2Xx9sGQEB/9DA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmqcHQ+PX6WfafjUKqS3QAfHDFunHv8lbn0u2Sard30wIhAKnHC9uUkzQl1Tdx4CuXczRY8Ay31i+uzn4B1N3rqgiB"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/policyfile-0.0.6.tgz_1492020063326_0.23513873969204724"}}},"maintainers":[{"email":"npm@3rd-Eden.com","name":"v1"},{"email":"npm@3rd-Eden.com","name":"3rdeden"}],"time":{"modified":"2022-06-24T06:33:25.043Z","created":"2011-05-31T20:50:44.777Z","0.0.1":"2011-05-31T20:50:45.177Z","0.0.2":"2011-06-16T18:47:55.845Z","0.0.3":"2011-06-17T09:57:21.732Z","0.0.4":"2011-07-23T20:36:53.025Z","0.0.5":"2011-10-29T23:22:52.420Z","0.0.6":"2017-04-12T18:01:03.607Z"},"author":{"name":"Arnout Kazemier"},"repository":{"type":"git","url":"git+https://github.com/3rd-Eden/FlashPolicyFileServer.git"},"users":{"m42am":true},"keywords":["flash","socket","policy","file","server","Flash Socket Policy File Server","cross domain"],"license":{"type":"MIT","url":"https://github.com/3rd-Eden/FlashPolicyFileServer/blob/master/LICENSE"},"readme":"## LOL, WUT?\nIt basically allows you to allow or disallow Flash Player sockets from accessing your site.\n\n## Installation\n\n```bash\nnpm install policyfile\n```\n## Usage\n\nThe server is based on the regular and know `net` and `http` server patterns. So it you can just listen\nfor all the events that a `net` based server emits etc. But there is one extra event, the `connect_failed`\nevent. This event is triggered when we are unable to listen on the supplied port number.\n\n### createServer\nCreates a new server instance and accepts 2 optional arguments:\n\n-  `options` **Object** Options to configure the server instance\n    -  `log` **Boolean** Enable logging to STDOUT and STDERR (defaults to true)\n-  `origins` **Array** An Array of origins that are allowed by the server (defaults to *:*)\n\n```js\nvar pf = require('policyfile').createServer();\n\npf.listen();\n```\n\n#### server.listen\nStart listening on the server and it takes 3 optional arguments\n\n-  `port` **Number** On which port number should we listen? (defaults to 843, which is the first port number the FlashPlayer checks)\n-  `server` **Server** A http server, if we are unable to accept requests or run the server we can also answer the policy requests inline over the supplied HTTP server.\n-  `callback` **Function** A callback function that is called when listening to the server was successful.\n\n```js\nvar pf = require('policyfile').createServer();\n\npf.listen(1337, function(){\n  console.log(':3 yay')\n});\n```\n\nChanging port numbers can be handy if you do not want to run your server as root and have port 843 forward to a non root port number (aka a number above 1024).\n\n```js\nvar pf = require('policyfile').createServer()\n  , http = require('http');\n\nserver = http.createServer(function(q,r){r.writeHead(200);r.end('hello world')});\nserver.listen(80);\n\npf.listen(1337, server, function(){\n  console.log(':3 yay')\n});\n```\n\nSupport for serving inline requests over a existing HTTP connection as the FlashPlayer will first check port 843, but if it's unable to get a response there it will send a policy file request over port 80, which is usually your http server.\n\n#### server.add\nAdds more origins to the policy file you can add as many arguments as you like.\n\n```js\nvar pf = require('policyfile').createServer(['google.com:80']);\n\npf.listen();\npf.add('blog.3rd-Eden.com:80', 'blog.3rd-Eden.com:8080'); // now has 3 origins\n```\n\n#### server.remove\nRemoves added origins from the policy file - you can add as many arguments as you like.\n\n```js\nvar pf = require('policyfile').createServer(['blog.3rd-Eden.com:80', 'blog.3rd-Eden.com:8080']);\n\npf.listen();\npf.remove('blog.3rd-Eden.com:8080'); // only contains the :80 version now\n```\n\n#### server.close\nShuts down the server\n\n```js\nvar pf = require('policyfile').createServer();\n\npf.listen();\npf.close(); // OH NVM.\n```\n\n## API\nhttp://3rd-eden.com/FlashPolicyFileServer/\n\n## Examples\nSee https://github.com/3rd-Eden/FlashPolicyFileServer/tree/master/examples for examples\n\n## Licence\n\nMIT see LICENSE file in the repository","readmeFilename":"README.md","homepage":"https://github.com/3rd-Eden/FlashPolicyFileServer#readme","bugs":{"url":"https://github.com/3rd-Eden/FlashPolicyFileServer/issues"}}