fix(api): remove http protocol

This commit is contained in:
Tat Dat Duong
2025-03-06 19:01:52 +01:00
parent 51add299e2
commit b3fbb60765
+2 -2
View File
@@ -45,14 +45,14 @@ api.post(
(i) => path.extname(i.basename) === ".css",
)) {
result.push(
`<link rel="stylesheet" href="http://${host}/ui/${agent}/${css.basename}" />`,
`<link rel="stylesheet" href="//${host}/ui/${agent}/${css.basename}" />`,
);
}
const js = files.find((i) => path.extname(i.basename) === ".js");
if (js) {
result.push(
`<script src="http://${host}/ui/${agent}/${js.basename}" onload='__LGUI_${agent}.render(${messageName}, "{{shadowRootId}}")'></script>`,
`<script src="//${host}/ui/${agent}/${js.basename}" onload='__LGUI_${agent}.render(${messageName}, "{{shadowRootId}}")'></script>`,
);
}