https://github.com/pillarjs/ssl-redirect
redirect users to the SSL version of your app
https://github.com/pillarjs/ssl-redirect
Last synced: over 1 year ago
JSON representation
redirect users to the SSL version of your app
- Host: GitHub
- URL: https://github.com/pillarjs/ssl-redirect
- Owner: pillarjs
- License: mit
- Created: 2014-06-08T09:08:26.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-09T05:19:41.000Z (almost 12 years ago)
- Last Synced: 2025-03-21T17:37:18.528Z (over 1 year ago)
- Language: JavaScript
- Size: 122 KB
- Stars: 11
- Watchers: 12
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SSL Redirect
[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Dependency Status][david-image]][david-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
Tiny server that redirects HTTP requests to SSL.
These is currently really rough and you probably shouldn't use it.
## API
```js
var server = require('ssl-redirect')(options)
```
An `http.Server` is returned and automatically starts.
Options are:
- `port` - the port to listen to.
Should be different than your actual SSL app.
- `host: localhost` - host to redirect to
- `maxAge: 16070400` - max age for `Strict-Transport-Security`
- `includeSubDomains: true` - for `Strict-Transport-Security`
[npm-image]: https://img.shields.io/npm/v/ssl-redirect.svg?style=flat-square
[npm-url]: https://npmjs.org/package/ssl-redirect
[github-tag]: http://img.shields.io/github/tag/pillarjs/ssl-redirect.svg?style=flat-square
[github-url]: https://github.com/pillarjs/ssl-redirect/tags
[travis-image]: https://img.shields.io/travis/pillarjs/ssl-redirect.svg?style=flat-square
[travis-url]: https://travis-ci.org/pillarjs/ssl-redirect
[coveralls-image]: https://img.shields.io/coveralls/pillarjs/ssl-redirect.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/pillarjs/ssl-redirect?branch=master
[david-image]: http://img.shields.io/david/pillarjs/ssl-redirect.svg?style=flat-square
[david-url]: https://david-dm.org/pillarjs/ssl-redirect
[license-image]: http://img.shields.io/npm/l/ssl-redirect.svg?style=flat-square
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/ssl-redirect.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/ssl-redirect
[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
[gittip-url]: https://www.gittip.com/jonathanong/