Commit ea4dd3b7f25d4a0ce51d6f74cd1c23de69a63462
1 parent
893ef7d2
修改日志读取链接
Showing
1 changed file
with
2 additions
and
2 deletions
src/main/resources/templates/logging/logging.html
| @@ -31,11 +31,11 @@ | @@ -31,11 +31,11 @@ | ||
| 31 | <script th:inline="javascript"> | 31 | <script th:inline="javascript"> |
| 32 | //websocket对象 | 32 | //websocket对象 |
| 33 | let websocket = null; | 33 | let websocket = null; |
| 34 | - var re=location.origin; | 34 | + var re=location.origin.replace("http:\\", "");//去掉http; |
| 35 | console.log(re); | 35 | console.log(re); |
| 36 | //判断当前浏览器是否支持WebSocket | 36 | //判断当前浏览器是否支持WebSocket |
| 37 | if ('WebSocket' in window) { | 37 | if ('WebSocket' in window) { |
| 38 | - websocket = new WebSocket("ws://localhost:"+[[${port}]]+"/logging/websocket"); | 38 | + websocket = new WebSocket("ws://"+re+"/logging/websocket"); |
| 39 | } else { | 39 | } else { |
| 40 | console.error("不支持WebSocket"); | 40 | console.error("不支持WebSocket"); |
| 41 | } | 41 | } |