aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-04-24 20:21:56 +0300
committerRblSb <msrblsb@gmail.com>2020-04-24 20:22:23 +0300
commit24f088dfa16b4e967d7315bddeadc844d388aee7 (patch)
tree62219f0d0a993648a995a5087795e2f0325e7e26 /src
parent95688a8494e2e71aeb4c9e3a1037c4848a90cd21 (diff)
Better APP_URL check
Diffstat (limited to 'src')
-rw-r--r--src/server/Main.hx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/Main.hx b/src/server/Main.hx
index e1789ff..b9c4d52 100644
--- a/src/server/Main.hx
+++ b/src/server/Main.hx
@@ -208,9 +208,10 @@ class Main {
// Prevent heroku idle when clients online (needs APP_URL env var)
if (process.env["_"] != null && process.env["_"].contains("heroku")
&& process.env["APP_URL"] != null) {
+ var url = process.env["APP_URL"];
+ if (!url.startsWith("http")) url = 'http://$url';
new Timer(10 * 60 * 1000).run = function() {
if (clients.length == 0) return;
- final url = 'http://${process.env["APP_URL"]}';
trace('Ping $url');
Http.get(url, r -> {});
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage