fix: where am i supposed to place it????????

This commit is contained in:
əlemi 2024-06-06 21:08:09 +02:00
parent d93e4f091b
commit da1f269850
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -31,7 +31,6 @@ pub async fn serve(ctx: upub::Context, bind: String) -> Result<(), std::io::Erro
use tower_http::{cors::CorsLayer, trace::TraceLayer}; use tower_http::{cors::CorsLayer, trace::TraceLayer};
let router = axum::Router::new() let router = axum::Router::new()
.layer(CorsLayer::permissive())
.layer( .layer(
// TODO 4xx errors aren't really failures but since upub is in development it's useful to log // TODO 4xx errors aren't really failures but since upub is in development it's useful to log
// these too, in case something's broken // these too, in case something's broken
@ -47,6 +46,7 @@ pub async fn serve(ctx: upub::Context, bind: String) -> Result<(), std::io::Erro
) )
.ap_routes() .ap_routes()
.mastodon_routes() // no-op if mastodon feature is disabled .mastodon_routes() // no-op if mastodon feature is disabled
.layer(CorsLayer::permissive())
.with_state(ctx); .with_state(ctx);
tracing::info!("serving api routes on {bind}"); tracing::info!("serving api routes on {bind}");