fix: The dialogue interface cannot be opened (#3774)

This commit is contained in:
shaohuzhang1 2025-07-30 11:15:40 +08:00 committed by GitHub
parent 1b23fb4472
commit 2281202921
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -111,7 +111,7 @@ def page_not_found(request, exception):
return HttpResponseRedirect(a)
index_path = os.path.join(PROJECT_DIR, 'apps', "static", 'chat', 'index.html')
content = get_index_html(index_path)
content = content.replace("prefix: '/chat'", f"prefix: {CONFIG.get_chat_path()}")
content = content.replace("prefix: '/chat'", f"prefix: '{CONFIG.get_chat_path()}'")
if not os.path.exists(index_path):
return HttpResponse("页面不存在", status=404)
return HttpResponse(content, status=200)