From 8079f9ea5b3f33b4093f93443550ab97593e72d4 Mon Sep 17 00:00:00 2001 From: RblSb Date: Mon, 9 Mar 2020 00:39:03 +0300 Subject: Fix local-only server --- build/server.js | 4 ++++ res/css/des.css | 5 ++--- src/server/Utils.hx | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/build/server.js b/build/server.js index 47380bd..65d13a9 100644 --- a/build/server.js +++ b/build/server.js @@ -1562,6 +1562,10 @@ server_Utils.getGlobalIp = function(callback) { js_node_Http.get("http://myexternalip.com/raw",function(r) { r.setEncoding("utf8"); return r.on("data",callback); + }).on("error",function(e) { + haxe_Log.trace("Warning: connection error, server is local.",{ fileName : "src/server/Utils.hx", lineNumber : 13, className : "server.Utils", methodName : "getGlobalIp"}); + callback("127.0.0.1"); + return; }); }; server_Utils.getLocalIp = function() { diff --git a/res/css/des.css b/res/css/des.css index 3ee977b..d611991 100644 --- a/res/css/des.css +++ b/res/css/des.css @@ -2,7 +2,7 @@ /* CSS Document */ -@import url(http://fonts.googleapis.com/css?family=Play:400italic,700italic,300,700,300italic,400&subset=latin,cyrillic); +@import url(https://fonts.googleapis.com/css?family=Play:400italic,700italic,300,700,300italic,400&subset=latin,cyrillic); /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ html { font-family:Play; @@ -1214,8 +1214,7 @@ input, textarea { color:#ffffff } html, body { - /* font-family: 'Roboto', sans-serif!important; */ - font-family:Play !important; + font-family:Play, 'Roboto', sans-serif !important; font-weight: 300; } p, h3, h4 { diff --git a/src/server/Utils.hx b/src/server/Utils.hx index 22ddc77..9c88bc2 100644 --- a/src/server/Utils.hx +++ b/src/server/Utils.hx @@ -9,6 +9,9 @@ class Utils { Http.get("http://myexternalip.com/raw", r -> { r.setEncoding("utf8"); r.on("data", callback); + }).on("error", e -> { + trace("Warning: connection error, server is local."); + callback("127.0.0.1"); }); } -- cgit v1.2.3