# sails-hook-httpsredirect-aws

> Sails JS hook to redirect from HTTP to HTTPS with support for AWS ELB

Latest version **1.0.1** (published 2017-09-14) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install sails-hook-httpsredirect-aws
pnpm add sails-hook-httpsredirect-aws
yarn add sails-hook-httpsredirect-aws
bun add sails-hook-httpsredirect-aws
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-09-14 |
| First published | 2017-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gabriel Alcivar |
| Maintainers | galcivar |
| Keywords | sails, hook, https, redirect |

## Links

- npm: https://www.npmjs.com/package/sails-hook-httpsredirect-aws
- Repository: https://github.com/galcivar/node-sails-hook-httpsredirect-aws
- Homepage: https://github.com/galcivar/node-sails-hook-httpsredirect-aws#readme
- Issues: https://github.com/galcivar/node-sails-hook-httpsredirect-aws/issues
- npm.io page: https://npm.io/package/sails-hook-httpsredirect-aws

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-09-14
- 1.0.0 — 2017-09-11

## README

# sails-hook-httpsredirect-aws
Forked from: https://github.com/greguz/node-sails-hook-httpsredirect

This [sails](http://sailsjs.com/) hook will start an HTTP server that will redirect all received requests to the HTTPS server lifted from sails that includes validation for AWS Elastic Load Balancer and fixes the bug: https://github.com/greguz/node-sails-hook-httpsredirect/issues/1.

If the HTTPS server is not configured, this module will not start any server.

## Installation

### NPM

Run `npm install --save sails-hook-httpsredirect-aws`

## Usage

Just install this module and lift your server.

## Configuration

### Parameters

| Parameter     | Type          | Default       | Description                                                                       |
| ------------- | ------------- | ------------- | --------------------------------------------------------------------------------- |
| disabled      | {Boolean}     | false         | if true, the HTTP server will not start                                           |
| hostname      | {String}      | '0.0.0.0'     | HTTP server accepted hostname, default all                                        |
| port          | {Number}      | 80 or 1337    | HTTP server port: by default port 80 on production and 1337 on other environments |

### Runtime

You can access the configuration from `sails.config.httpsredirect` var.

### File

You can customize the settings by creating **config/httpsredirect.js** file.

```javascript
/**
 * HTTP to HTTPS hook configuration
 */

module.exports.httpsredirect = {

  // listen only localhost requests
  hostname: '127.0.0.1',

  // from port 1234
  port: 1234

};
```

---
_Source: https://npm.io/package/sails-hook-httpsredirect-aws · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
