is-ssl

Check if the given request is HTTPS

Use
Last updated 3 years ago by pi0 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install is-ssl 
SYNC missed versions from official npm registry.

is-https

Check if the given request is HTTPS

npm npm (scoped with tag)

Usage

Install package

yarn add is-https # or npm install is-https

Exported function blueprint is isHTTPS (req, xForwardedProto = true): Boolean.

Behaviour

This function tries to use 3 standard checks for HTTPS detection:

  • Test if req.connection.encrypted is true
  • Test if req.protocol is https
  • Test if x-forwarded-proto header contains https (Only when xForwardedProto argument is true)

Return value:

  • If one of tests is passing, function return true
  • If all tests are unavailable, function returns null
  • Else function returns false

License

MIT - Nuxt.js

Current Tags

  • 0.0.0                                ...           latest (3 years ago)

1 Versions

  • 0.0.0 [deprecated]           ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 2
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |