aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuben Beltran del Rio <jj@r.bdr.sh>2026-02-17 00:05:59 +0100
committerRuben Beltran del Rio <jj@r.bdr.sh>2026-02-17 00:06:22 +0100
commit3754edbd272a16e0939204bce21aa85d5f13714a (patch)
treeb1e3826ad0dd4d22bf55e200fc0b5ded7abd6ccf /src
parent115bb78ac9919a9a1fc046622b4545e9ba4513f5 (diff)
Force HTTPs when useHttps is true1.0.2
This is required for farm mode, as it will build urls with http:// hardcoded.
Diffstat (limited to 'src')
-rw-r--r--src/server.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server.js b/src/server.js
index a833dad..3cb08da 100644
--- a/src/server.js
+++ b/src/server.js
@@ -11,7 +11,10 @@ const internals = {
let host = wiki_domain || url;
if (host.includes("//")) {
- return `${host}`;
+ if (security_useHttps) {
+ return host.replace(/^http:\/\//, "https://");
+ }
+ return host;
}
const protocol = security_useHttps ? "https" : "http";