chore: pre-migration snapshot
Some checks failed
WAF Intelligence Guardrail / waf-intel (push) Waiting to run
Cloudflare Registry Validation / validate-registry (push) Has been cancelled

Layer0, MCP servers, Terraform consolidation
This commit is contained in:
Vault Sovereign
2025-12-27 01:52:27 +00:00
parent 7f2e60e1c5
commit f0b8d962de
67 changed files with 14887 additions and 650 deletions

View File

@@ -0,0 +1,22 @@
from mcp.cloudflare_safe.cloudflare_api import parse_cloudflared_config_ingress
def test_parse_cloudflared_config_ingress_extracts_hostnames_and_services():
sample = """\
tunnel: 00000000-0000-0000-0000-000000000000
credentials-file: /etc/cloudflared/0000.json
ingress:
- hostname: "api.example.com"
service: http://127.0.0.1:8080
- hostname: app.example.com
service: "http://127.0.0.1:3000"
- service: http_status:404
"""
rules = parse_cloudflared_config_ingress(sample)
assert rules == [
{"hostname": "api.example.com", "service": "http://127.0.0.1:8080"},
{"hostname": "app.example.com", "service": "http://127.0.0.1:3000"},
]