XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

fix: update path replacements in render function for static files

1e39bf56
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -4
Modified g4f/gui/server/website.py +2 -4
@@ -67,10 +67,8 @@ def render(filename = "home", download_url: str = GITHUB_URL):
67 67 if not cache_file.endswith(".js") and response.headers.get("Content-Type", "").startswith("application/javascript"):
68 68 cache_file += ".js"
69 69 html = response.text
70 html = html.replace("../dist/", f"dist/")
71 html = html.replace("/dist/", f"dist/")
72 html = html.replace(f"{STATIC_URL}dist/", "dist/")
73 html = html.replace("dist/", f"{STATIC_URL}dist/")
70 html = html.replace('"/dist/', f"{STATIC_URL}/dist/")
71 html = html.replace('"../dist/', f"{STATIC_URL}/dist/")
74 72 # html = html.replace(JSDELIVR_URL, "/")
75 73 html = html.replace("{{ v }}", latest_version)
76 74 if is_temp: