various: bump dependencies; wire up dead code

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I12432bc956453cc4b0a2db82dce1b4976a6a6964
This commit is contained in:
raf 2026-02-05 14:36:01 +03:00
commit 875bdf5ebc
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
6 changed files with 764 additions and 427 deletions

View file

@ -65,9 +65,7 @@ pub fn create_router_with_tls(
// Login route with strict rate limiting
let login_route = Router::new()
.route("/auth/login", post(routes::auth::login))
.layer(GovernorLayer {
config: login_governor,
});
.layer(GovernorLayer::new(login_governor));
// Public routes (no auth required)
let public_routes = Router::new()
@ -82,16 +80,12 @@ pub fn create_router_with_tls(
let search_routes = Router::new()
.route("/search", get(routes::search::search))
.route("/search", post(routes::search::search_post))
.layer(GovernorLayer {
config: search_governor,
});
.layer(GovernorLayer::new(search_governor));
// Streaming routes with enhanced rate limiting (5 concurrent)
let streaming_routes = Router::new()
.route("/media/{id}/stream", get(routes::media::stream_media))
.layer(GovernorLayer {
config: stream_governor,
});
.layer(GovernorLayer::new(stream_governor));
// Read-only routes: any authenticated user (Viewer+)
let viewer_routes = Router::new()
@ -561,9 +555,7 @@ pub fn create_router_with_tls(
let router = Router::new()
.nest("/api/v1", full_api)
.layer(DefaultBodyLimit::max(10 * 1024 * 1024))
.layer(GovernorLayer {
config: global_governor,
})
.layer(GovernorLayer::new(global_governor))
.layer(TraceLayer::new_for_http())
.layer(cors)
.layer(security_headers);