mirror of https://github.com/iconify/api.git
Remove SSL, it should be done in nginx reverse proxy
This commit is contained in:
parent
2597f662a9
commit
ad3fc6a1c8
|
|
@ -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
2
app.js
|
|
@ -1,7 +1,5 @@
|
|||
/**
|
||||
* Main file to run in Node.js
|
||||
*
|
||||
* Run ssl.js instead of you want SSL support.
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
|
|
|
|||
|
|
@ -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
26
ssl.js
|
|
@ -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;
|
||||
Loading…
Reference in New Issue