docs/proxy/auth.md
The proxy supports proxy.auth_mode with four modes:
off — no auth required.strict — auth required for all routes.all_except_health — auth required for all routes except GET /healthz.auto — derived policy: if proxy.allow_lan_access=true then all_except_health, otherwise off.Implementation:
src-tauri/src/proxy/config.rs
ProxyAuthMode in src-tauri/src/proxy/config.rssrc-tauri/src/proxy/security.rs
ProxySecurityConfig::from_proxy_config(...) in src-tauri/src/proxy/security.rssrc-tauri/src/proxy/middleware/auth.rs
auth_middleware(...) validates Authorization: Bearer <proxy.api_key>OPTIONS requests are allowed (CORS preflight)all_except_health, GET /healthz bypasses authHot reload:
src-tauri/src/commands/mod.rs
save_config(...) calls axum_server.update_security(&config.proxy).awaitWhen auth is enabled, clients should send:
Authorization: Bearer <proxy.api_key>Notes:
proxy.auth_mode=all_except_health and proxy.api_key in the UI (src/pages/ApiProxy.tsx).
GET /healthz succeeds without auth.POST /v1/messages) return 401 without auth and succeed with the header.