{"_id":"is-https","_rev":"2958099","name":"is-https","description":"Check if the given request is HTTPS","dist-tags":{"latest":"4.0.0"},"maintainers":[{"name":"npm:pi0","email":""},{"name":"pi0","email":"pooya@pi0.ir"}],"time":{"modified":"2023-04-28T03:52:35.000Z","created":"2017-07-21T10:09:58.243Z","4.0.0":"2021-05-17T10:49:28.948Z","3.0.2":"2020-12-18T12:11:16.784Z","3.0.1":"2020-12-14T17:35:02.933Z","3.0.0":"2020-12-14T17:33:40.755Z","2.0.2":"2020-06-02T11:45:50.891Z","2.0.1":"2020-05-31T11:17:00.017Z","2.0.0":"2020-05-31T11:14:26.616Z","1.0.0":"2017-07-21T10:09:58.243Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/unjs/is-https.git"},"versions":{"4.0.0":{"name":"is-https","version":"4.0.0","description":"Check if the given request is HTTPS","repository":{"type":"git","url":"git+https://github.com/unjs/is-https.git"},"license":"MIT","sideEffects":false,"exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs"}},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"siroc build","release":"yarn build && standard-version && npm publish && git push --follow-tags"},"devDependencies":{"@types/node":"latest","siroc":"latest","standard-version":"latest"},"gitHead":"d9eb4dddffa88708b95052ea2a1d68ad36eb912c","bugs":{"url":"https://github.com/unjs/is-https/issues"},"homepage":"https://github.com/unjs/is-https#readme","_id":"is-https@4.0.0","_nodeVersion":"14.16.1","_npmVersion":"7.12.1","dist":{"shasum":"9ee725a334fb517b988278d2674efc96e4f348ed","size":1981,"noattachment":false,"key":"/is-https/-/is-https-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-https/download/is-https-4.0.0.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"npm:pi0","email":""},{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-https_4.0.0_1621248568784_0.5423923401896049"},"_hasShrinkwrap":false,"publish_time":1621248568948,"_cnpm_publish_time":1621248568948,"_cnpmcore_publish_time":"2021-12-16T16:11:09.068Z"},"3.0.2":{"name":"is-https","version":"3.0.2","description":"Check if the given request is HTTPS","repository":{"type":"git","url":"git+https://github.com/nuxt-contrib/is-https.git"},"license":"MIT","sideEffects":false,"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"build":"siroc build","release":"yarn build && standard-version && npm publish && git push --follow-tags"},"devDependencies":{"@types/node":"^14.0.6","rollup-plugin-typescript2":"^0.27.1","siroc":"^0.6.0","standard-version":"^8.0.0","typescript":"^3.9.3"},"gitHead":"f44ae7cbdb982f2d7672a2d9fb347432ec207be0","bugs":{"url":"https://github.com/nuxt-contrib/is-https/issues"},"homepage":"https://github.com/nuxt-contrib/is-https#readme","_id":"is-https@3.0.2","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"shasum":"4d24e002e47edd3f1b07f14bc722433354ccba49","size":2528,"noattachment":false,"key":"/is-https/-/is-https-3.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-https/download/is-https-3.0.2.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"npm:pi0","email":""},{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-https_3.0.2_1608293476594_0.010144250829879242"},"_hasShrinkwrap":false,"publish_time":1608293476784,"_cnpm_publish_time":1608293476784,"_cnpmcore_publish_time":"2021-12-16T16:11:09.275Z"},"3.0.1":{"name":"is-https","version":"3.0.1","description":"Check if the given request is HTTPS","repository":{"type":"git","url":"git+https://github.com/nuxt-contrib/is-https.git"},"license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"siroc build","release":"yarn build && standard-version && npm publish && git push --follow-tags"},"devDependencies":{"@types/node":"^14.0.6","rollup-plugin-typescript2":"^0.27.1","siroc":"^0.6.0","standard-version":"^8.0.0","typescript":"^3.9.3"},"gitHead":"5211eb9c581d302d65a31c00f8973f26d7d89acb","bugs":{"url":"https://github.com/nuxt-contrib/is-https/issues"},"homepage":"https://github.com/nuxt-contrib/is-https#readme","_id":"is-https@3.0.1","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"shasum":"2dd850e9919ac770f1ca9b5155abae4ab6d17161","size":2463,"noattachment":false,"key":"/is-https/-/is-https-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-https/download/is-https-3.0.1.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"npm:pi0","email":""},{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-https_3.0.1_1607967302741_0.29485497352467216"},"_hasShrinkwrap":false,"publish_time":1607967302933,"_cnpm_publish_time":1607967302933,"_cnpmcore_publish_time":"2021-12-16T16:11:09.654Z"},"3.0.0":{"name":"is-https","version":"3.0.0","description":"Check if the given request is HTTPS","repository":{"type":"git","url":"git+https://github.com/nuxt-contrib/is-https.git"},"license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"siroc build","release":"yarn build && standard-version && npm publish && git push --follow-tags"},"devDependencies":{"@types/node":"^14.0.6","rollup-plugin-typescript2":"^0.27.1","siroc":"^0.6.0","standard-version":"^8.0.0","typescript":"^3.9.3"},"gitHead":"856723f590a4249e20386424b637ab48c6fe9f82","bugs":{"url":"https://github.com/nuxt-contrib/is-https/issues"},"homepage":"https://github.com/nuxt-contrib/is-https#readme","_id":"is-https@3.0.0","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"shasum":"d3fce827c845378103163a616e799682d6c9548b","size":2681,"noattachment":false,"key":"/is-https/-/is-https-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-https/download/is-https-3.0.0.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"npm:pi0","email":""},{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-https_3.0.0_1607967220598_0.6800192339027016"},"_hasShrinkwrap":false,"publish_time":1607967220755,"_cnpm_publish_time":1607967220755,"_cnpmcore_publish_time":"2021-12-16T16:11:09.930Z"},"2.0.2":{"name":"is-https","version":"2.0.2","description":"Check if the given request is HTTPS","repository":{"type":"git","url":"git+https://github.com/nuxt-contrib/is-https.git"},"license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"bili src/index.ts --minimal","release":"yarn build && standard-version && npm publish && git push --follow-tags"},"devDependencies":{"@types/node":"^14.0.6","bili":"^4.10.0","rollup-plugin-typescript2":"^0.27.1","standard-version":"^8.0.0","typescript":"^3.9.3"},"gitHead":"3320a7811a41258d627b2db9a9db8edcb37d1d5a","bugs":{"url":"https://github.com/nuxt-contrib/is-https/issues"},"homepage":"https://github.com/nuxt-contrib/is-https#readme","_id":"is-https@2.0.2","_nodeVersion":"12.16.2","_npmVersion":"6.14.5","dist":{"shasum":"7009d303c72580f15897d5c063d6b6bc1f838fef","size":2598,"noattachment":false,"key":"/is-https/-/is-https-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-https/download/is-https-2.0.2.tgz"},"maintainers":[{"name":"npm:pi0","email":""},{"name":"pi0","email":"pooya@pi0.ir"}],"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-https_2.0.2_1591098350737_0.5873612591308548"},"_hasShrinkwrap":false,"publish_time":1591098350891,"_cnpm_publish_time":1591098350891,"_cnpmcore_publish_time":"2021-12-16T16:11:10.122Z"},"2.0.1":{"name":"is-https","version":"2.0.1","description":"Check if the given request is HTTPS","repository":{"type":"git","url":"git+https://github.com/nuxt-contrib/is-https.git"},"license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"bili src/index.ts --minimal","release":"yarn build && standard-version && npm publish && git push --follow-tags"},"devDependencies":{"@types/node":"^14.0.6","bili":"^4.10.0","rollup-plugin-typescript2":"^0.27.1","standard-version":"^8.0.0","typescript":"^3.9.3"},"gitHead":"4e30aa9b6ebfbe7f7e55dffaf94e4a5693b56e03","bugs":{"url":"https://github.com/nuxt-contrib/is-https/issues"},"homepage":"https://github.com/nuxt-contrib/is-https#readme","_id":"is-https@2.0.1","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"shasum":"65d71ab735e42a71def1f2333ceb05418eb3efe4","size":2587,"noattachment":false,"key":"/is-https/-/is-https-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-https/download/is-https-2.0.1.tgz"},"maintainers":[{"name":"npm:pi0","email":""},{"name":"pi0","email":"pooya@pi0.ir"}],"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-https_2.0.1_1590923819911_0.5146679101370448"},"_hasShrinkwrap":false,"publish_time":1590923820017,"_cnpm_publish_time":1590923820017,"_cnpmcore_publish_time":"2021-12-16T16:11:10.409Z"},"2.0.0":{"name":"is-https","version":"2.0.0","description":"Check if the given request is HTTPS","repository":{"type":"git","url":"git+https://github.com/nuxt-contrib/is-https.git"},"license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"bili src/index.ts --minimal","release":"yarn build && standard-version && npm publish && git push --follow-tags"},"devDependencies":{"@types/node":"^14.0.6","bili":"^4.10.0","rollup-plugin-typescript2":"^0.27.1","standard-version":"^8.0.0","typescript":"^3.9.3"},"gitHead":"9ffee871085eb1254646d4552850cd99bd78868e","bugs":{"url":"https://github.com/nuxt-contrib/is-https/issues"},"homepage":"https://github.com/nuxt-contrib/is-https#readme","_id":"is-https@2.0.0","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"shasum":"acd8bc9535cc6f099e5391eadde49b23a88a3336","size":2559,"noattachment":false,"key":"/is-https/-/is-https-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-https/download/is-https-2.0.0.tgz"},"maintainers":[{"name":"npm:pi0","email":""},{"name":"pi0","email":"pooya@pi0.ir"}],"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-https_2.0.0_1590923666464_0.7164559492097682"},"_hasShrinkwrap":false,"publish_time":1590923666616,"_cnpm_publish_time":1590923666616,"_cnpmcore_publish_time":"2021-12-16T16:11:10.646Z"},"1.0.0":{"name":"is-https","version":"1.0.0","description":"Check if the given request is HTTPS","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/nuxt-community/is-https.git"},"author":{"name":"Pooya Parsa","email":"pooya@pi0.ir"},"license":"MIT","gitHead":"93b9ddda62b45b81cfaf587fd0f13a8ccacf6b00","bugs":{"url":"https://github.com/nuxt-community/is-https/issues"},"homepage":"https://github.com/nuxt-community/is-https#readme","_id":"is-https@1.0.0","_npmVersion":"5.2.0","_nodeVersion":"8.1.2","_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"dist":{"shasum":"9c1dde000dc7e7288edb983bef379e498e7cb1bf","size":1777,"noattachment":false,"key":"/is-https/-/is-https-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-https/download/is-https-1.0.0.tgz"},"maintainers":[{"name":"npm:pi0","email":""},{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-https-1.0.0.tgz_1500631798137_0.3576956877950579"},"directories":{},"publish_time":1500631798243,"_hasShrinkwrap":false,"_cnpm_publish_time":1500631798243,"_cnpmcore_publish_time":"2021-12-16T16:11:10.900Z"}},"readme":"# is-https\n> Check if the given request is HTTPS\n\n[![npm](https://img.shields.io/npm/dt/is-https.svg?style=flat-square)](https://npmjs.com/package/is-https)\n[![npm (scoped with tag)](https://img.shields.io/npm/v/is-https/latest.svg?style=flat-square)](https://npmjs.com/package/is-https)\n\n## Usage\n\nInstall package:\n\n```bash\nyarn add is-https\n# or\nnpm install is-https\n```\n\n```js\nconst isHTTPS = require('is-https')\n// or\nimport isHTTPS from 'is-https'\n```\n\n```ts\nfunction isHTTPS(req: IncomingMessage, trustProxy: Boolean = true): Boolean | undefined\n```\n\n## Behaviour\n\n`isHTTPS` function tries to use 2 different methods for HTTPS detection:\n\n- Test if `x-forwarded-proto` header contains `https`\n  - Can be disabled by setting `trustProxy` argument to `false`\n- Test if `req.connection.encrypted` is `true`\n\nReturns either `true` or `false` based on checks or `undefined` if no check was reliable.\n\n**TIP:** If you want to redirect users from `http` to `https`, it is better using `isHTTPS(req) === false` to avoid redirect loops.\n\n## Related\n\n- [redirect-ssl](https://www.npmjs.com/package/redirect-ssl) - Connect middleware to enforce HTTPS\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/unjs/is-https#readme","bugs":{"url":"https://github.com/unjs/is-https/issues"},"license":"MIT"}