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:
Dionisio
2026-03-02 23:25:01 +01:00
parent 05acd6fb7b
commit b199968a6e
3 changed files with 0 additions and 125 deletions
-1
View File
@@ -1,2 +1 @@
pub mod auth;
pub mod redirect; // Add redirect middleware for API to Axum transition