fix: make full_margin env save/restart reliable (no empty numeric wipe).
EOF Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -23,8 +23,15 @@ _POST_LICENSE_TARGET = "/login"
|
||||
|
||||
|
||||
def _license_public_path(path: str) -> bool:
|
||||
"""未授权时仍可访问的路径(授权页 / 接口 / 静态资源)。"""
|
||||
if path in ("/license", "/api/license/status", "/api/license/redeem", "/api/license/validate", "/health"):
|
||||
"""未授权时仍可访问的路径(授权页 / 接口 / 静态资源 / 重启探活)。"""
|
||||
if path in (
|
||||
"/license",
|
||||
"/api/license/status",
|
||||
"/api/license/redeem",
|
||||
"/api/license/validate",
|
||||
"/health",
|
||||
"/api/admin/health",
|
||||
):
|
||||
return True
|
||||
if path.startswith("/static/"):
|
||||
return True
|
||||
@@ -33,6 +40,7 @@ def _license_public_path(path: str) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
|
||||
def _license_manage_requested() -> bool:
|
||||
"""已授权时默认禁止进入 /license;续费/换机用 ?renew=1。"""
|
||||
return (request.args.get("renew") or request.args.get("manage") or "").strip().lower() in (
|
||||
|
||||
Reference in New Issue
Block a user