fix(metablogizer): Add original_backend to vhost config for WAF route sync
When MetaBlogizer creates HAProxy vhosts, it routes through mitmproxy_inspector for WAF inspection. However, mitmproxyctl sync-routes needs the original_backend field to determine where to forward traffic after WAF inspection. Without original_backend, sites would return 404 after upload because mitmproxy had no route to forward traffic to the actual backend. This fix adds original_backend=$backend_name to all 3 vhost creation locations: - method_create_site (line 491) - method_emancipate_site (line 1210) - method_upload_and_create_site (line 2001) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a469076297
commit
97aaf902fc
@ -489,6 +489,7 @@ EOF
|
||||
uci set "haproxy.$vhost_name=vhost"
|
||||
uci set "haproxy.$vhost_name.domain=$domain"
|
||||
uci set "haproxy.$vhost_name.backend=mitmproxy_inspector"
|
||||
uci set "haproxy.$vhost_name.original_backend=$backend_name"
|
||||
uci set "haproxy.$vhost_name.ssl=$ssl"
|
||||
uci set "haproxy.$vhost_name.ssl_redirect=$ssl"
|
||||
uci set "haproxy.$vhost_name.acme=$acme_val"
|
||||
@ -1207,6 +1208,7 @@ EOF
|
||||
uci set "haproxy.$vhost_name=vhost"
|
||||
uci set "haproxy.$vhost_name.domain=$domain"
|
||||
uci set "haproxy.$vhost_name.backend=mitmproxy_inspector"
|
||||
uci set "haproxy.$vhost_name.original_backend=$backend_name"
|
||||
uci set "haproxy.$vhost_name.ssl=1"
|
||||
uci set "haproxy.$vhost_name.ssl_redirect=1"
|
||||
uci set "haproxy.$vhost_name.acme=1"
|
||||
@ -1996,6 +1998,7 @@ EOF
|
||||
uci set "haproxy.$vhost_name=vhost"
|
||||
uci set "haproxy.$vhost_name.domain=$domain"
|
||||
uci set "haproxy.$vhost_name.backend=mitmproxy_inspector"
|
||||
uci set "haproxy.$vhost_name.original_backend=$backend_name"
|
||||
uci set "haproxy.$vhost_name.ssl=1"
|
||||
uci set "haproxy.$vhost_name.ssl_redirect=1"
|
||||
uci set "haproxy.$vhost_name.acme=1"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user