Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
redirect-ssl
Advanced tools
Connect/Express middleware to enforce https using is-https.
Install package
yarn add redirect-ssl # or npm install redirect-ssl
Require and use middleware (Make sure adding it as the first in the chain)
const redirectSSL = require('redirect-ssl')
// Add middleware
app.use(redirectSSL)
// Or if want to provide options
app.use(redirectSSL.create({ redirectPort: 8443 }))
true
Trust and check x-forwarded-proto
header for HTTPS detection.
process.env.NODE_ENV === 'production'
Only enabled in production environment. Force redirecting locally by setting this option to true
.
443
Redirect users to this port for HTTPS. (:443
is omitted from URL as is default for https://
schema)
undefined
Redirects using this value as host, if omitted will use request host for redirects.
NOTE It should not contain schema or trailing slashes. (Example: google.com
)
true
Redirect when no SSL detection method is available too. disable this option if you encounter redirect loops.
307
Temporary RedirectStatus code when redirecting. The reason of choosing 307
for default is:
POST
TO GET
by user agents. (If you don't care, use 302
Found)308
Permanent Redirect or 301
Moved Permanently)MIT - Nuxt.js
FAQs
Connect/Express middleware to enforce https
The npm package redirect-ssl receives a total of 2,743 weekly downloads. As such, redirect-ssl popularity was classified as popular.
We found that redirect-ssl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.