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:
@@ -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>
|
||||
|
||||
@@ -107,5 +107,5 @@
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ url_for('static', filename='app.js') }}"></script>
|
||||
<script src="{{ panel_base }}/static/app.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user