Fix OpenClaw: auto-include gateway token in dashboard link
Deploy Dashboard / deploy (push) Successful in 48s
Deploy Dashboard / deploy (push) Successful in 48s
This commit is contained in:
@@ -34,3 +34,6 @@ WEBAUTHN_ORIGIN = os.environ.get("WEBAUTHN_ORIGIN", "https://nas.jimmygan.com")
|
||||
|
||||
# CORS
|
||||
CORS_ORIGINS = os.environ.get("CORS_ORIGINS", "https://nas.jimmygan.com").split(",")
|
||||
|
||||
# OpenClaw
|
||||
OPENCLAW_GATEWAY_TOKEN = os.environ.get("OPENCLAW_GATEWAY_TOKEN", "")
|
||||
|
||||
@@ -5,7 +5,7 @@ import platform
|
||||
import time
|
||||
import httpx
|
||||
from fastapi import APIRouter, Query
|
||||
from config import TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID, VOLUME_ROOT
|
||||
from config import TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID, VOLUME_ROOT, OPENCLAW_GATEWAY_TOKEN
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@@ -110,3 +110,8 @@ def _classify(method, path, status, user):
|
||||
return "noise"
|
||||
# Info — everything else
|
||||
return "info"
|
||||
|
||||
|
||||
@router.get("/openclaw-token")
|
||||
def openclaw_token():
|
||||
return {"token": OPENCLAW_GATEWAY_TOKEN}
|
||||
|
||||
Reference in New Issue
Block a user