diff --git a/README.md b/README.md index aca61eb..9f0b469 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,8 @@ Here is a fully annotated configuration file in TOML showing all of the availabl host = "localhost" port = 8088 # These are the default values +ignoreSSL = false +# false by default, ignores unsigned cert [proxy] timeout = 5000 diff --git a/src/serve.js b/src/serve.js index 78ed1e3..1e8d1f7 100644 --- a/src/serve.js +++ b/src/serve.js @@ -6,6 +6,11 @@ export default function () { const port = server.port || 8088; const host = server.host || 'localhost'; + const ignoreSSL = server.ignoreSSL; + if (ignoreSSL) { + console.log('[WARNING] ignoring SSL certs, use with caution!'); + process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; + } console.log('Starting server: [http://%s:%s]', host, port); app.listen(port, host); }