Socket
Socket
Sign inDemoInstall

ssl-express-www

Package Overview
Dependencies
63
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ssl-express-www

Redirecting HTTP to HTTPS. It forces SSL (HTTPS) when HTTP is required using Express (Nodejs) and remove www and trailing slash on your domain.


Version published
Weekly downloads
3K
increased by16.11%
Maintainers
1
Install size
1.89 MB
Created
Weekly downloads
 

Readme

Source

Force SSL using Express (Redirect HTTP to HTTPS)

Redirecting HTTP to HTTPS. It forces SSL (HTTPS) when HTTP is required using Express (Nodejs) and remove www and trailing slash on your domain.

project-version downloads npm mocha Build Status

Installation

npm install ssl-express-www

Usage CommonJS

var express = require('express');
var secure = require('ssl-express-www');
var app = express();

app.use(secure);

var port = process.env.PORT || 3000;
app.listen(port, () => console.log('Server listening.'));

Usage ES6

Transpile it with Babel

import express from 'express';
import secure from 'ssl-express-www';

const app = express();

app.use(secure);

let port = process.env.PORT || 3000;
app.listen(port, () => console.log('Server listening.'));

License

This project is licensed under the MIT License - see the LICENSE file for details

Keywords

FAQs

Last updated on 05 Jan 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc