Skip to content

Commit

Permalink
enable useHTTP for full electron version
Browse files Browse the repository at this point in the history
  • Loading branch information
sdetweil committed Dec 26, 2021
1 parent bd5664c commit 28d866c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ _This release is scheduled to be released on 2022-01-01._
- Fixed User-Agent-Header for newsfeed and calendar module (#2729).
- Replace broken shields in Readme and use https for links.
- Fixed electron tests with retry.
- Fix useHttp for full version #2749

## [2.17.1] - 2021-10-01

Expand Down
9 changes: 8 additions & 1 deletion js/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function createWindow() {
// If config.address is not defined or is an empty string (listening on all interfaces), connect to localhost

let prefix;
if (config["tls"] !== null && config["tls"]) {
if ((config["tls"] !== null && config["tls"]) || config.useHttps) {
prefix = "https://";
} else {
prefix = "http://";
Expand Down Expand Up @@ -140,6 +140,13 @@ app.on("before-quit", (event) => {
process.exit(0);
});

/* handle errors from self signed certificates */

app.on("certificate-error", (event, webContents, url, error, certificate, callback) => {
event.preventDefault();
callback(true);
});

// Start the core application if server is run on localhost
// This starts all node helpers and starts the webserver.
if (["localhost", "127.0.0.1", "::1", "::ffff:127.0.0.1", undefined].includes(config.address)) {
Expand Down

0 comments on commit 28d866c

Please sign in to comment.