Giter Site home page Giter Site logo

brunomacedo / ssl-express-www Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 5.0 2.25 MB

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

License: MIT License

JavaScript 100.00%
force-ssl ssl-express express force-https https trailing-slash heroku-redirect heroku-https enforce-https remove-www

ssl-express-www's Introduction

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

ssl-express-www's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ssl-express-www's Issues

Custom URL configurations

In our application, we have a dev environment whose URL is not on https. So while applying this library, that will not be working any more.

Is there any option that one can specify the URLs on which this redirection is not needed.

Thanks

It breaks my domain completely

When I installed this thing and tested the website is not available anymore.
I'd suggest check if its working still otherwise delist this thing for good.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.