no message

This commit is contained in:
kuaifan 2021-07-09 21:07:00 +08:00
parent f1dce47efa
commit 0f6e330da1
4 changed files with 15 additions and 7 deletions

View File

@ -28,7 +28,7 @@ server {
allow all; allow all;
} }
location =/api/ws { location =/ws {
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-PORT $remote_port; proxy_set_header X-Real-PORT $remote_port;

View File

@ -216,10 +216,14 @@
return str; return str;
} }
if (window.systemInformation && typeof window.systemInformation.origin === "string") { if (window.systemInformation && typeof window.systemInformation.origin === "string") {
return window.systemInformation.origin + str; str = window.systemInformation.origin + str;
} else { } else {
return window.location.origin + "/" + str; str = window.location.origin + "/" + str;
} }
while (str.indexOf("/../") !== -1) {
str = str.replace(/\/(((?!\/).)*)\/\.\.\//, "/")
}
return str
}, },
/** /**
@ -1558,4 +1562,4 @@
}); });
window.$A = $; window.$A = $;
})(window, require('jquery')); })(window, window.$ = window.jQuery = require('jquery'));

View File

@ -1423,7 +1423,7 @@ export default {
return; return;
} }
// //
let url = state.method.apiUrl('ws'); let url = state.method.apiUrl('../ws');
url = url.replace("https://", "wss://"); url = url.replace("https://", "wss://");
url = url.replace("http://", "ws://"); url = url.replace("http://", "ws://");
url += "?action=web&token=" + state.userToken; url += "?action=web&token=" + state.userToken;

View File

@ -8,10 +8,14 @@ const method = {
return str; return str;
} }
if (window.systemInformation && typeof window.systemInformation.apiUrl === "string") { if (window.systemInformation && typeof window.systemInformation.apiUrl === "string") {
return window.systemInformation.apiUrl + str; str = window.systemInformation.apiUrl + str;
} else { } else {
return window.location.origin + "/api/" + str; str = window.location.origin + "/api/" + str;
} }
while (str.indexOf("/../") !== -1) {
str = str.replace(/\/(((?!\/).)*)\/\.\.\//, "/")
}
return str
}, },
date2string(params, format) { date2string(params, format) {