Spaces:
Running
Running
fix: clean up invalid auth.defaultScope from persisted config
Browse files- Remove auth.defaultScope and gateway.auth.scope on startup
- These keys were synced to dataset backup and crash OpenClaw
- Force rebuild (v3.7)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Dockerfile +1 -1
- scripts/sync_hf.py +10 -0
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# OpenClaw on Hugging Face Spaces β Pre-built image (v3.
|
| 2 |
# Uses official pre-built image to avoid 30+ minute builds on cpu-basic
|
| 3 |
|
| 4 |
# ββ Stage 1: Pull pre-built OpenClaw βββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
| 1 |
+
# OpenClaw on Hugging Face Spaces β Pre-built image (v3.7)
|
| 2 |
# Uses official pre-built image to avoid 30+ minute builds on cpu-basic
|
| 3 |
|
| 4 |
# ββ Stage 1: Pull pre-built OpenClaw βββββββββββββββββββββββββββββββββββββββββ
|
scripts/sync_hf.py
CHANGED
|
@@ -429,6 +429,16 @@ class OpenClawFullSync:
|
|
| 429 |
if isinstance(locs, list) and "/dev/null" in locs:
|
| 430 |
data["plugins"]["locations"] = [l for l in locs if l != "/dev/null"]
|
| 431 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 432 |
# Force full gateway config for HF Spaces
|
| 433 |
# Dynamic allowedOrigins from SPACE_HOST (auto-set by HF runtime)
|
| 434 |
allowed_origins = [
|
|
|
|
| 429 |
if isinstance(locs, list) and "/dev/null" in locs:
|
| 430 |
data["plugins"]["locations"] = [l for l in locs if l != "/dev/null"]
|
| 431 |
|
| 432 |
+
# Clean up invalid config keys that crash OpenClaw
|
| 433 |
+
if "auth" in data and isinstance(data.get("auth"), dict):
|
| 434 |
+
data["auth"].pop("defaultScope", None)
|
| 435 |
+
if not data["auth"]:
|
| 436 |
+
del data["auth"]
|
| 437 |
+
if "gateway" in data and isinstance(data.get("gateway"), dict):
|
| 438 |
+
auth = data["gateway"].get("auth", {})
|
| 439 |
+
if isinstance(auth, dict):
|
| 440 |
+
auth.pop("scope", None)
|
| 441 |
+
|
| 442 |
# Force full gateway config for HF Spaces
|
| 443 |
# Dynamic allowedOrigins from SPACE_HOST (auto-set by HF runtime)
|
| 444 |
allowed_origins = [
|