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:
@@ -1,3 +1,5 @@
|
||||
pub mod error;
|
||||
pub mod handler;
|
||||
pub mod headers;
|
||||
|
||||
pub use crate::config::dynamic_config::normalize_host;
|
||||
|
||||
Reference in New Issue
Block a user