fix: resolve stuck detecting state for panel stats on subpath deploy

Always inject panel_base from PANEL_PATH for static/API URLs and set
SCRIPT_NAME in middleware so /api/stats works behind nginx subpaths.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-16 10:31:58 +08:00
parent ba361eb5b8
commit d75193d527
5 changed files with 58 additions and 13 deletions
+2 -2
View File
@@ -4,9 +4,9 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}jiedian 面板{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<link rel="stylesheet" href="{{ panel_base }}/static/style.css">
</head>
<body{% if request.script_root %} data-base="{{ request.script_root }}"{% endif %}>
<body data-base="{{ panel_base }}">
{% block body %}{% endblock %}
{% block scripts %}{% endblock %}
</body>