aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-03-09 00:39:03 +0300
committerRblSb <msrblsb@gmail.com>2020-03-09 00:39:03 +0300
commit8079f9ea5b3f33b4093f93443550ab97593e72d4 (patch)
tree4a93d7f0d53a43f743078c44dc32a6d2e954a159
parent39e12465aa30c79799e9c443f0fa393a07019cef (diff)
Fix local-only server
-rw-r--r--build/server.js4
-rw-r--r--res/css/des.css5
-rw-r--r--src/server/Utils.hx3
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");
});
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage