{"_id":"express-sslify","_rev":"23-6659d0b52ef659f99cd54914e0c2967e","name":"express-sslify","description":"Enforces SSL for node.js express projects","dist-tags":{"latest":"1.2.0"},"versions":{"0.0.1":{"name":"express-sslify","version":"0.0.1","description":"Enforces SSL for node.js express projects","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/florianheinemann/express-sslify.git"},"keywords":["express","node.js","node","ssl","sslify","http","redirect"],"author":{"name":"Florian Heinemann","email":"florian.heinemann@gmail.com","url":"http://twitter.com/florian__h"},"license":"MIT","bugs":{"url":"https://github.com/florianheinemann/express-sslify/issues"},"homepage":"https://github.com/florianheinemann/express-sslify","_id":"express-sslify@0.0.1","dist":{"shasum":"bb906079cf274a921d069ccb22f2b7545e33772f","tarball":"https://registry.npmjs.org/express-sslify/-/express-sslify-0.0.1.tgz","integrity":"sha512-lQ/34WJN84E+/Dv34ZAGXcmrRJ1B6SmDogLCpHoIZfchCoaj0w8eCoL2F5pw6IkUpYYLSlGl7AIhLTNFk7uYKQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHRfAaWCWshs+p7Xj5vjCaf+jwD2yckGKIREkxx8YM7wIgZ0F3pIeYNN1/yDF/08/A/pcutWhtxamVcctK7FtXI8Y="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"florianheinemann","email":"florian.heinemann@gmail.com"},"maintainers":[{"name":"florianheinemann","email":"florian.heinemann@gmail.com"}]},"0.1.0":{"name":"express-sslify","version":"0.1.0","description":"Enforces SSL for node.js express projects","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/florianheinemann/express-sslify.git"},"keywords":["express","node.js","node","ssl","sslify","http","redirect"],"author":{"name":"Florian Heinemann","email":"florian.heinemann@gmail.com","url":"http://twitter.com/florian__h"},"license":"MIT","bugs":{"url":"https://github.com/florianheinemann/express-sslify/issues"},"homepage":"https://github.com/florianheinemann/express-sslify","_id":"express-sslify@0.1.0","_shasum":"de1fa2371af6099fe2cdf7fd36385e2594d1b50c","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"florianheinemann","email":"florian.heinemann@gmail.com"},"maintainers":[{"name":"florianheinemann","email":"florian.heinemann@gmail.com"}],"dist":{"shasum":"de1fa2371af6099fe2cdf7fd36385e2594d1b50c","tarball":"https://registry.npmjs.org/express-sslify/-/express-sslify-0.1.0.tgz","integrity":"sha512-tBYz6F7sWewvJIj1K2YnmW93lhM9VLAasjx1tHyySM4z9E+0617KJWXDrlPUxSZAKJ6hm/CDhsYbV+yt/8qQ+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6J4D45VWx1pnai5guL4V6iN/gMPpyUndF9/fLwuoyrgIgZsA6gumWaZBIqNs61FX8A7lP/zZ9MMFYrQJ2yKjyNow="}]}},"0.1.1":{"name":"express-sslify","version":"0.1.1","description":"Enforces SSL for node.js express projects","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/florianheinemann/express-sslify.git"},"keywords":["express","node.js","node","ssl","sslify","http","redirect"],"author":{"name":"Florian Heinemann","email":"florian.heinemann@gmail.com","url":"http://twitter.com/florian__h"},"license":"MIT","bugs":{"url":"https://github.com/florianheinemann/express-sslify/issues"},"homepage":"https://github.com/florianheinemann/express-sslify","devDependencies":{"chai":"^1.10.0","express":"^4.10.2","grunt":"^0.4.5","grunt-mocha-test":"^0.12.3","mocha":"^2.0.1","supertest":"^0.15.0"},"_id":"express-sslify@0.1.1","_shasum":"b0ea927685ef73415ee906c584fc5dd851acaba2","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"florianheinemann","email":"florian.heinemann@gmail.com"},"maintainers":[{"name":"florianheinemann","email":"florian.heinemann@gmail.com"}],"dist":{"shasum":"b0ea927685ef73415ee906c584fc5dd851acaba2","tarball":"https://registry.npmjs.org/express-sslify/-/express-sslify-0.1.1.tgz","integrity":"sha512-eUKkasWrfJAAyI5Xr24s7QtGiyq5yJ3S5W51YRP9cwnv6/UG1MYMl1KO8iBvs4aRqBFgkAagdSlcGDzO4JNTTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUtqqMJ+qKWHqK0d4Tch7wQYaJuETO75+G9rGLaGyg+wIgMhm4W34+2uVTmGYL+rw6w3lxD0OIkOtMRMNSaSoPpCg="}]}},"0.1.2":{"name":"express-sslify","version":"0.1.2","description":"Enforces SSL for node.js express projects","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"git+https://github.com/florianheinemann/express-sslify.git"},"keywords":["express","node.js","node","ssl","sslify","http","redirect"],"author":{"name":"Florian Heinemann","email":"florian.heinemann@gmail.com","url":"http://twitter.com/florian__h"},"license":"MIT","bugs":{"url":"https://github.com/florianheinemann/express-sslify/issues"},"homepage":"https://github.com/florianheinemann/express-sslify","devDependencies":{"chai":"^3.0.0","express":"^4.13.1","grunt":"^0.4.5","grunt-mocha-test":"^0.12.7","mocha":"^2.2.5","supertest":"^1.0.1"},"gitHead":"3a1f62153fe3a6e300d7114425b16cf1fffc8c5b","_id":"express-sslify@0.1.2","_shasum":"cc15018995967f28a7829a02bfe850fb56663e8b","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"florianheinemann","email":"florian.heinemann@gmail.com"},"dist":{"shasum":"cc15018995967f28a7829a02bfe850fb56663e8b","tarball":"https://registry.npmjs.org/express-sslify/-/express-sslify-0.1.2.tgz","integrity":"sha512-eIlf/F+mNHDjl4wmaYHVjADDrSngVAruAfof9ElVl/Se0hIgnaO3KnKsOej2VpfVcPegXrODMTDpeCleaLo82w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4KUyJilMTNX1qq6QtlHHmWjiKm+epEdRKqoE17Q5xDQIhAPqag2BsIkCTkbKLhaG5yEh/OuPX7O0CutaAaOATmPFv"}]},"maintainers":[{"name":"florianheinemann","email":"florian.heinemann@gmail.com"}]},"1.0.0":{"name":"express-sslify","version":"1.0.0","description":"Enforces SSL for node.js express projects","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"git+https://github.com/florianheinemann/express-sslify.git"},"keywords":["express","node.js","node","ssl","sslify","http","redirect"],"author":{"name":"Florian Heinemann","email":"florian.heinemann@gmail.com","url":"http://twitter.com/florian__h"},"license":"MIT","bugs":{"url":"https://github.com/florianheinemann/express-sslify/issues"},"homepage":"https://github.com/florianheinemann/express-sslify","devDependencies":{"chai":"^3.0.0","express":"^4.13.1","grunt":"^0.4.5","grunt-mocha-test":"^0.12.7","mocha":"^2.2.5","supertest":"^1.0.1"},"gitHead":"c55e3b8629787681d4520b766a71a9150cedbd8b","_id":"express-sslify@1.0.0","_shasum":"45ca22e3fd4f17b2cad99f0b0da72bcbb5b7f7d5","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"florianheinemann","email":"florian.heinemann@gmail.com"},"dist":{"shasum":"45ca22e3fd4f17b2cad99f0b0da72bcbb5b7f7d5","tarball":"https://registry.npmjs.org/express-sslify/-/express-sslify-1.0.0.tgz","integrity":"sha512-Z/SetkbpdYJ9rp/6IkxXXnS7c8AJ7FoTip7BxT0iUEvK3B1pcoPsQ3EZccRWByumtLaE4Jj2YyOK591Qsf6IuQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkVVZ1BK1CFlU90yaQcjPcAbIsQZCxzXixrjnr5X+xKwIhAOhzoS0jZfElp1iEw3GquPY8nBkVx9tx9nWaMk3kUb0N"}]},"maintainers":[{"name":"florianheinemann","email":"florian.heinemann@gmail.com"}]},"1.0.1":{"name":"express-sslify","version":"1.0.1","description":"Enforces SSL for node.js express projects","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"git+https://github.com/florianheinemann/express-sslify.git"},"keywords":["express","node.js","node","ssl","sslify","http","redirect"],"author":{"name":"Florian Heinemann","email":"florian.heinemann@gmail.com","url":"http://twitter.com/florian__h"},"license":"MIT","bugs":{"url":"https://github.com/florianheinemann/express-sslify/issues"},"homepage":"https://github.com/florianheinemann/express-sslify","devDependencies":{"chai":"^3.0.0","express":"^4.13.1","grunt":"^0.4.5","grunt-mocha-test":"^0.12.7","mocha":"^2.2.5","supertest":"^1.0.1"},"gitHead":"46ad30784482f43bd00418db00bf778539d2ddc8","_id":"express-sslify@1.0.1","_shasum":"b2edef24ee1ce326a9bbb981af4e7cae3c8f67cf","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"florianheinemann","email":"florian.heinemann@gmail.com"},"dist":{"shasum":"b2edef24ee1ce326a9bbb981af4e7cae3c8f67cf","tarball":"https://registry.npmjs.org/express-sslify/-/express-sslify-1.0.1.tgz","integrity":"sha512-smapYrVXGgu/TXLNbUWYmILhL80MpZ/yYEuyKqxizmUMTo9ddfXgBA5vc1yzQpTNkAU31vZMwOxQzSxtcegz/A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCINaVbQ5tX9Oy0uLNoFNGkbmZPBvLOyOQ83iXYPWqnJgIgDan9sFG26INQYxn2+4fyN3XFlZ/qV49x5PJnwrCth6E="}]},"maintainers":[{"name":"florianheinemann","email":"florian.heinemann@gmail.com"}]},"1.1.0":{"name":"express-sslify","version":"1.1.0","description":"Enforces SSL for node.js express projects","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"git+https://github.com/florianheinemann/express-sslify.git"},"keywords":["express","node.js","node","ssl","sslify","http","redirect"],"author":{"name":"Florian Heinemann","email":"florian.heinemann@gmail.com","url":"http://twitter.com/florian__h"},"license":"MIT","bugs":{"url":"https://github.com/florianheinemann/express-sslify/issues"},"homepage":"https://github.com/florianheinemann/express-sslify","devDependencies":{"chai":"^3.0.0","express":"^4.13.1","grunt":"^1.0.1","grunt-mocha-test":"^0.12.7","mocha":"^2.2.5","supertest":"^1.0.1"},"gitHead":"b65286ba2ab99875dbc455b8edeb8ed99da11f57","_id":"express-sslify@1.1.0","_shasum":"5d9fdcf944502d8dcf0cc49687cd5e0e0e7fee2f","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"florianheinemann","email":"florian.heinemann@gmail.com"},"dist":{"shasum":"5d9fdcf944502d8dcf0cc49687cd5e0e0e7fee2f","tarball":"https://registry.npmjs.org/express-sslify/-/express-sslify-1.1.0.tgz","integrity":"sha512-xnLCvlVQKs4/9OU2TMokwlJy5hZ8UTrwi34ZCOAi7ZQ6L6+xJQFCBMV70DYHT1vFfN7Z6ZSODeWttc3UQYIzqw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNyWxRDWDfqcCDLg3edHJ17Kq+YKINIpoh3Z+q62v9EwIhAKr44eopEiw4ykIPM91CMMZLlX7C1epP5qqr8NcReyS0"}]},"maintainers":[{"name":"florianheinemann","email":"florian.heinemann@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/express-sslify-1.1.0.tgz_1467467422621_0.4698788912501186"}},"1.2.0":{"name":"express-sslify","version":"1.2.0","description":"Enforces SSL for node.js express projects","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"git+https://github.com/florianheinemann/express-sslify.git"},"keywords":["express","node.js","node","ssl","sslify","http","redirect"],"author":{"name":"Florian Heinemann","email":"florian.heinemann@gmail.com","url":"http://twitter.com/florian__h"},"license":"MIT","bugs":{"url":"https://github.com/florianheinemann/express-sslify/issues"},"homepage":"https://github.com/florianheinemann/express-sslify","devDependencies":{"chai":"^3.0.0","express":"^4.13.1","grunt":"^1.0.1","grunt-mocha-test":"^0.12.7","mocha":"^2.2.5","supertest":"^1.0.1"},"gitHead":"d38c07ced6db6bc164fcb95c67bf09aa28ffe4ef","_id":"express-sslify@1.2.0","_shasum":"30e84bceed1557eb187672bbe1430a0a2a100d9c","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"florianheinemann","email":"florian.heinemann@gmail.com"},"dist":{"shasum":"30e84bceed1557eb187672bbe1430a0a2a100d9c","tarball":"https://registry.npmjs.org/express-sslify/-/express-sslify-1.2.0.tgz","integrity":"sha512-OOf2B3MxAVjEXPPWl4Z19wA2oMH+RCULJVhejPwuhiDDClr9QczZz5ycABLSnnN+oY8JcLs32ghs9cxOj0vi+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBoGP5CAUo7c676M1Qr/rFbaX3r+Nsv/E8QOQP6tw7IXAiEAs4Xkrm+9qgEqbTpFbTu/yENa30b7l/642thRbI64gjU="}]},"maintainers":[{"name":"florianheinemann","email":"florian.heinemann@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/express-sslify-1.2.0.tgz_1482423852921_0.04576574033126235"}}},"readme":"express-sslify\n==============\n\nThis simple module enforces HTTPS connections on any incoming GET and HEAD requests. In case of a non-encrypted HTTP request, express-sslify automatically redirects to an HTTPS address using a 301 permanent redirect. Any other type of request (e.g., POST) will fail with a 403 error message.\n\nexpress-sslify also works behind reverse proxies (load balancers) such as those used by Heroku or nodejitsu. In those cases, however, the `trustProtoHeader` parameter has to be set (see below)\n\n### Usage\n\nFirst, install the module:\n\n`$ npm install express-sslify --save`\n\nAfterwards, require the module and *use* the `HTTPS()` method:\n```javascript\nvar express = require('express');\nvar http = require('http');\nvar enforce = require('express-sslify');\n\nvar app = express();\n\n// Use enforce.HTTPS({ trustProtoHeader: true }) in case you are behind\n// a load balancer (e.g. Heroku). See further comments below\napp.use(enforce.HTTPS());\n\nhttp.createServer(app).listen(app.get('port'), function() {\n\tconsole.log('Express server listening on port ' + app.get('port'));\n});\n```\n\n### Reverse Proxies (Heroku, nodejitsu and others)\n\nHeroku, nodejitsu and other hosters often use reverse proxies which offer SSL endpoints but then forward unencrypted HTTP traffic to the website. This makes it difficult to detect if the original request was indeed via HTTPS. Luckily, most reverse proxies set the `x-forwarded-proto` header flag with the original request scheme. express-sslify is ready for such scenarios, but you have to specifically request the evaluation of this flag:\n\n`app.use(enforce.HTTPS({ trustProtoHeader: true }))`\n\nPlease do *not* set this flag if you are not behind a proxy that is setting this flag. HTTP headers can be easily spoofed outside of environments that are actively setting/removing the header.\n\n### Azure support\n\nAzure has a slightly different way of signaling encrypted connections. To tell express-sslify to look out for Azure's x-arr-ssl header do the following:\n\n`app.use(enforce.HTTPS({ trustAzureHeader: true }))`\n\nPlease do *not* set this flag if you are not behind an Azure proxy as this flag can be easily spoofed outside of an Azure environment.\n\n### X-Forwarded-Host header support\n\nIf your reverse proxy sends the original host using the `X-Forwarded-Host` header and you need to use that instead of the `Host` header for the redirect, use the `trustXForwardedHostHeader` flag:\n\n`app.use(enforce.HTTPS({ trustXForwardedHostHeader: true }))`\n\n## Tests\nDownload the whole repository and call:\n`$ npm install; npm test`\n\n### Credits and License\nexpress-sslify is licensed under the MIT license. If you'd like to be informed about new projects follow  [@TheSumOfAll](http://twitter.com/TheSumOfAll/).\n\nCopyright (c) 2013-2016 Florian Heinemann\n","maintainers":[{"name":"florianheinemann","email":"florian.heinemann@gmail.com"}],"time":{"modified":"2022-06-17T22:40:37.302Z","created":"2014-03-23T00:35:25.220Z","0.0.1":"2014-03-23T00:35:26.908Z","0.1.0":"2014-05-02T11:53:55.241Z","0.1.1":"2014-11-16T04:31:34.340Z","0.1.2":"2015-07-06T16:53:33.606Z","1.0.0":"2015-10-24T16:58:48.382Z","1.0.1":"2015-10-25T14:12:08.973Z","1.1.0":"2016-07-02T13:50:24.953Z","1.2.0":"2016-12-22T16:24:13.510Z"},"readmeFilename":"README.md","homepage":"https://github.com/florianheinemann/express-sslify","keywords":["express","node.js","node","ssl","sslify","http","redirect"],"repository":{"type":"git","url":"git+https://github.com/florianheinemann/express-sslify.git"},"author":{"name":"Florian Heinemann","email":"florian.heinemann@gmail.com","url":"http://twitter.com/florian__h"},"bugs":{"url":"https://github.com/florianheinemann/express-sslify/issues"},"license":"MIT","users":{"uwo":true,"kevin.delisle":true,"jmsherry":true,"rocket0191":true,"alexcoady":true,"alexxnica":true,"elvnthaus":true,"thatwasawkward":true}}