V10.514 新增 Webcrumbs host data API
All checks were successful
CD Pipeline / deploy (push) Successful in 1m10s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m10s
This commit is contained in:
@@ -62,9 +62,10 @@ def _is_blocked_external_url(configured_url):
|
||||
return parsed.scheme in {"http", "https"} and parsed.hostname != "mo.wooo.work"
|
||||
|
||||
|
||||
def _webcrumbs_seed_data():
|
||||
def build_webcrumbs_seed_data(limit: int = 5):
|
||||
"""Build safe Webcrumbs host data for page seed and read-only API."""
|
||||
try:
|
||||
return build_webcrumbs_marketplace_host_data(limit=5)
|
||||
return build_webcrumbs_marketplace_host_data(limit=limit)
|
||||
except Exception as exc:
|
||||
sys_log.warning(f"[Webcrumbs] host data build skipped: {exc}")
|
||||
return {
|
||||
@@ -170,7 +171,7 @@ def _webcrumbs_payload():
|
||||
],
|
||||
"plugin_previews": plugin_previews,
|
||||
"plugin_preview_uris": [preview["uri"] for preview in plugin_previews],
|
||||
"plugin_seed_data": _webcrumbs_seed_data(),
|
||||
"plugin_seed_data": build_webcrumbs_seed_data(limit=5),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user