mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-03-18 08:56:50 +08:00
url refactoring
This commit is contained in:
@@ -46,7 +46,7 @@ function Session() {
|
||||
let text = JSON.stringify(state.meta, undefined, 4).replace(/ /g, " ").replace(/\n/g, "<br>");
|
||||
$("about-meta").innerHTML = `
|
||||
<span class="code-comment">// The Pi-KVM metadata.<br>
|
||||
// You can get this json using handle <a target="_blank" href="/kvmd/info">/kvmd/info</a>.<br>
|
||||
// You can get this json using handle <a target="_blank" href="/api/info">/api/info</a>.<br>
|
||||
// In the standard configuration this data<br>
|
||||
// is specified in the file /etc/kvmd/meta.yaml.</span><br>
|
||||
<br>
|
||||
@@ -69,11 +69,11 @@ function Session() {
|
||||
$("link-led").className = "led-yellow";
|
||||
$("link-led").title = "Connecting...";
|
||||
|
||||
let http = tools.makeRequest("GET", "/kvmd/auth/check", function() {
|
||||
let http = tools.makeRequest("GET", "/api/auth/check", function() {
|
||||
if (http.readyState === 4) {
|
||||
if (http.status === 200) {
|
||||
let proto = (location.protocol === "https:" ? "wss" : "ws");
|
||||
__ws = new WebSocket(`${proto}://${location.host}/kvmd/ws`);
|
||||
__ws = new WebSocket(`${proto}://${location.host}/api/ws`);
|
||||
__ws.onopen = __wsOpenHandler;
|
||||
__ws.onmessage = __wsMessageHandler;
|
||||
__ws.onerror = __wsErrorHandler;
|
||||
|
||||
Reference in New Issue
Block a user