perf: remove dead redirect middleware (ran on every request doing nothing)
The redirect middleware was a leftover from the custom HTTP server → Axum migration. It executed on every single request (including static files), allocating a String from the URI path and performing 3 starts_with() checks, but never actually redirected anything — just debug logging. - Remove middleware application from main.rs - Remove pub mod redirect from middleware/mod.rs - Delete redirect.rs (121 lines of dead code) Saves ~80-170ns of overhead per request (String alloc + comparisons + Tower layer dispatch).
This commit is contained in:
@@ -1,2 +1 @@
|
||||
pub mod auth;
|
||||
pub mod redirect; // Add redirect middleware for API to Axum transition
|
||||
|
||||
Reference in New Issue
Block a user