New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

koa-ssl

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-ssl

Enforce SSL for koa apps

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
518
increased by55.09%
Maintainers
1
Weekly downloads
 
Created
Source

koa-ssl

koa-ssl enforces SSL for koa apps. By default, it will not trust proxies (i.e. by the x-forwarded-for header), and it will only be enabled when process.env.NODE_ENV === 'production' is true.

Use

var ssl = require('koa-ssl');
app.use(ssl(useProxy, enable));

useProxy tells koa-ssl to trust the x-forwarded-proto header from a proxy server (for example, a Heroku app, which is served by Nginx).

enable tells koa-ssl to be enabled. If there is no argument passed, it defaults to the value of process.env.NODE_ENV === 'production'.

Keywords

FAQs

Package last updated on 18 Apr 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc