betterwithage Claude Opus 4.7 commited on
Commit
adec5ab
·
verified ·
1 Parent(s): d069699

deploy(hf): sync szl-holdings/a11oy@ed65f8de91c5db9f5e2624305855c50a4bb3086f derived COPY set

Browse files

Reusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy ed65f8de91c5db9f5e2624305855c50a4bb3086f.
Files: 1182 Pruned: 0
Derived from Dockerfile COPY sources (NO hand-maintained allowlist).

Signed-off-by: SZL Holdings <noreply@szlholdings.ai>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Files changed (1) hide show
  1. routers/gdw_frontier.py +10 -2
routers/gdw_frontier.py CHANGED
@@ -449,10 +449,18 @@ def _decision(payload: GDWStepRequest) -> str:
449
  return "ACCEPT"
450
 
451
 
 
 
 
452
  def _policy_gateway_origin() -> str:
453
  origin = os.environ.get("GDW_POLICY_ORIGIN", "").strip().rstrip("/")
454
- if not origin.startswith("https://"):
455
- raise RuntimeError("GDW_POLICY_ORIGIN must be an HTTPS origin")
 
 
 
 
 
456
  return origin
457
 
458
 
 
449
  return "ACCEPT"
450
 
451
 
452
+ _LOOPBACK_POLICY_GATEWAY_ORIGIN = "http://127.0.0.1:7860"
453
+
454
+
455
  def _policy_gateway_origin() -> str:
456
  origin = os.environ.get("GDW_POLICY_ORIGIN", "").strip().rstrip("/")
457
+ if (
458
+ origin != _LOOPBACK_POLICY_GATEWAY_ORIGIN
459
+ and not origin.startswith("https://")
460
+ ):
461
+ raise RuntimeError(
462
+ "GDW_POLICY_ORIGIN must be HTTPS or the exact local gateway"
463
+ )
464
  return origin
465
 
466