Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore ssl certs as config property #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}