samlax12 commited on
Commit
12f1771
·
verified ·
1 Parent(s): 0f23033

Update templates/index.html

Browse files
Files changed (1) hide show
  1. 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 response = await fetch(`${window.location.protocol}//${window.location.host}/api/knowledge`);
 
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) {