fix(metablogizer): Auto-restart mitmproxy after adding routes

- Add mitmproxy restart after _add_mitmproxy_route() to load new routes
- mitmproxy loads routes at startup only, so restart is required
- Run restart in background to avoid blocking publish command

Also fixed on router:
- Disabled health check for mitmproxy_inspector backend
- HAProxy health check fails because mitmproxy returns 404 for
  requests without valid Host header

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-03-17 11:46:53 +01:00
parent 3127986fbc
commit 8e55757dee

View File

@ -481,6 +481,11 @@ except Exception as e:
pass pass
" 2>/dev/null " 2>/dev/null
fi fi
# Trigger mitmproxy reload to pick up new route
# mitmproxy loads routes at startup, so we need to restart it
# Run in background to avoid blocking publish
( sleep 1 && /etc/init.d/mitmproxy restart ) >/dev/null 2>&1 &
} }
cmd_publish() { cmd_publish() {