Update templates/index.html
Browse files- templates/index.html +2 -1
templates/index.html
CHANGED
@@ -1100,7 +1100,8 @@ function toggleKnowledgeSelection(element) {
|
|
1100 |
// 加载知识库列表
|
1101 |
async function loadKnowledgeBases() {
|
1102 |
try {
|
1103 |
-
const
|
|
|
1104 |
const result = await response.json();
|
1105 |
|
1106 |
if (result.success) {
|
|
|
1100 |
// 加载知识库列表
|
1101 |
async function loadKnowledgeBases() {
|
1102 |
try {
|
1103 |
+
const protocol = window.location.protocol.startsWith('https') ? window.location.protocol : 'https:';
|
1104 |
+
const response = await fetch(`${protocol}//${window.location.host}/api/knowledge`);
|
1105 |
const result = await response.json();
|
1106 |
|
1107 |
if (result.success) {
|