zohararad/sails-rest — pull request #24 by adambiggs (2014-10-30 23:05:45+00:00)
Title: Allow `rejectUnauthorized` restify flag to be set in config.

Our team just switched all our servers to only accept HTTPS connections. Locally, we use self-signed SSL certificates, but `sails-rest` throws a security error when trying to connect to the origin server.

This PR enables the `rejectUnauthorized` flag to be passed into `restify` from your `sails-rest` config.

E.g.:

```js
{
adapter: 'sails-rest',
host: process.env.ORIGIN_HOST,
protocol: 'https',
port: 433,
rejectUnauthorized: process.env.NODE_ENV !== 'development' // Allow self-signed certificates in dev mode
}
```