This commit is contained in:
Skye 2023-08-15 22:01:24 +09:00
parent 8329c75ccf
commit 723a184f7d
Signed by: me
GPG key ID: 0104BC05F41B77B8

View file

@ -3,7 +3,7 @@ use std::fmt::Debug;
use anyhow::Result; use anyhow::Result;
use axum::{ use axum::{
async_trait, async_trait,
extract::{FromRef, FromRequestParts, Query, State}, extract::{FromRef, FromRequestParts, Query, State, DefaultBodyLimit},
http::{header::AUTHORIZATION, request::Parts, HeaderValue, StatusCode}, http::{header::AUTHORIZATION, request::Parts, HeaderValue, StatusCode},
response::{IntoResponse, Response}, response::{IntoResponse, Response},
routing::{delete, get, post}, routing::{delete, get, post},
@ -267,6 +267,7 @@ async fn main() -> anyhow::Result<()> {
.allow_headers([AUTHORIZATION, CONTENT_TYPE, IF_NONE_MATCH]), .allow_headers([AUTHORIZATION, CONTENT_TYPE, IF_NONE_MATCH]),
), ),
) )
.layer(DefaultBodyLimit::max(512 * 1024))
.layer(sentry_tower::NewSentryLayer::<_>::new_from_top()) .layer(sentry_tower::NewSentryLayer::<_>::new_from_top())
.layer(sentry_tower::SentryHttpLayer::with_transaction()) .layer(sentry_tower::SentryHttpLayer::with_transaction())
.with_state(AppState { .with_state(AppState {