Remove SSL, it should be done in nginx reverse proxy

This commit is contained in:
Vjacheslav Trushkin 2018-10-11 00:28:06 +03:00
parent 2597f662a9
commit ad3fc6a1c8
4 changed files with 1 additions and 36 deletions

View File

@ -1,7 +0,0 @@
Put your SSL certificate here to enable SSL support.
Change file names to "ssl".
Files:
* ssl.key
* ssl.crt
* ssl.ca-bundle

2
app.js
View File

@ -1,7 +1,5 @@
/**
* Main file to run in Node.js
*
* Run ssl.js instead of you want SSL support.
*/
"use strict";

View File

@ -1,6 +1,6 @@
{
"name": "simple-svg-website-icons",
"version": "1.0.0-beta2",
"version": "1.0.0-beta3",
"description": "Node.js version of icons.simplesvg.com",
"main": "app.js",
"scripts": {

26
ssl.js
View File

@ -1,26 +0,0 @@
/**
* Run this file instead of app.js if you want to enable SSL support
*/
"use strict";
const https = require('https'),
fs = require('fs');
let app = require('./app');
try {
let ssl = {
secureProtocol: 'SSLv23_method',
secureOptions: require('constants').SSL_OP_NO_SSLv3,
key: fs.readFileSync('.ssl/ssl.key'),
cert: fs.readFileSync('.ssl/ssl.crt'),
ca: fs.readFileSync('.ssl/ssl.ca-bundle'),
};
let port = process.env.SSLPORT || 443;
https.createServer(ssl, app).listen(port);
console.log('Listening on port ' + port);
} catch (err) {
console.log('SSL certificates are missing');
}
module.exports = app;