Skip to content

Commit 58a85a4

Browse files
committed
fix: shorten SVG MIME override comment
1 parent 21dcf63 commit 58a85a4

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

astrbot/dashboard/server.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
from .plugin_page_auth import PluginPageAuth
3333
from .services.auth_service import DASHBOARD_JWT_COOKIE_NAME
3434

35-
# Windows 下 Python mimetypes 会按系统注册表将 .svg 映射为 image/svg,
36-
# 导致 WebUI 静态资源(favicon.svg 等)返回非标准 MIME 类型,Chrome 无法渲染。
37-
# 显式覆盖为标准类型,使其在任意平台上行为一致。
35+
# Windows 的 mimetypes 会把 .svg 映射成非标准的 image/svg,这里强制覆盖为标准类型
3836
mimetypes.add_type("image/svg+xml", ".svg", strict=True)
3937

4038
_RATE_LIMITED_ENDPOINTS: frozenset = frozenset(

0 commit comments

Comments
 (0)