fix: add TraceLayer and Vite proxy config (supporting changes)

- Add tower-http TraceLayer to Axum router for request logging
- Configure Vite dev server proxy for /api and /media to localhost:3000
- Add TEST_GUIDE.md for manual frontend testing steps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-04-03 18:14:06 +02:00
parent c58216268f
commit 53a28d361b
3 changed files with 51 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ use axum::extract::DefaultBodyLimit;
use axum::routing::{delete, get, patch, post};
use axum::Router;
use tower_http::services::ServeDir;
use tower_http::trace::TraceLayer;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
mod auth;
@@ -91,6 +92,7 @@ async fn main() -> Result<()> {
.route("/health", get(|| async { "ok" }))
.merge(api)
.nest_service("/media", media_service)
.layer(TraceLayer::new_for_http())
.with_state(state);
let listener = tokio::net::TcpListener::bind(("0.0.0.0", config.app_port)).await?;