Fix calculator instance auth header to X-Hub-Token.

Market info fetch was rejected by instances because it sent the wrong bridge token header; align with hub monitor calls.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-23 18:17:42 +08:00
parent 5e507d0b66
commit f78ea1288e
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -168,9 +168,9 @@ def list_calculator_exchanges() -> list[dict[str, Any]]:
def _hub_headers() -> dict[str, str]:
import os
token = (os.getenv("HUB_BRIDGE_TOKEN") or "").strip()
token = (os.getenv("HUB_BRIDGE_TOKEN") or os.getenv("CONTROL_TOKEN") or "").strip()
if token:
return {"X-Hub-Bridge-Token": token}
return {"X-Hub-Token": token}
return {}