Implement host-based routing with global routing table

Add routing table (HashMap<String, SiteConfig>) to DynamicConfig for
O(1) host lookup. Implement normalize_host (lowercase + strip port)
per RFC 7230 §2.7.3. Add proxy_handler that routes /health to 200,
missing Host to 400, unknown host to 404, and known host to 200.
Routing table updates atomically via ArcSwap.
This commit is contained in:
2026-06-11 12:57:31 +00:00
parent 994ce0fb66
commit d5f5713deb
6 changed files with 413 additions and 23 deletions

View File

@@ -1,3 +1,5 @@
pub mod error;
pub mod handler;
pub mod headers;
pub use crate::config::dynamic_config::normalize_host;