Skip to content

fix: limit JSON payload size to 10MB #1133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/handlers/http/modal/ingest_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl IngestServer {
web::put()
.to(ingestor_logstream::put_stream)
.authorize_for_stream(Action::CreateStream),
),
)
)
.service(
// GET "/logstream/{logstream}/info" ==> Get info for given log stream
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/http/modal/query_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ impl QueryServer {
.to(querier_logstream::delete)
.authorize_for_stream(Action::DeleteStream),
)
.app_data(web::PayloadConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE)),
.app_data(web::JsonConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE)),
)
.service(
// GET "/logstream/{logstream}/info" ==> Get info for given log stream
Expand Down
10 changes: 5 additions & 5 deletions src/handlers/http/modal/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ impl Server {
.to(logstream::delete)
.authorize_for_stream(Action::DeleteStream),
)
.app_data(web::PayloadConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE)),
.app_data(web::JsonConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE)),
)
.service(
// GET "/logstream/{logstream}/info" ==> Get info for given log stream
Expand Down Expand Up @@ -404,7 +404,7 @@ impl Server {
.to(ingest::ingest)
.authorize_for_stream(Action::Ingest),
)
.app_data(web::PayloadConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE))
.app_data(web::JsonConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE))
}

// /v1/logs endpoint to be used for OTEL log ingestion only
Expand All @@ -417,7 +417,7 @@ impl Server {
.to(ingest::handle_otel_logs_ingestion)
.authorize_for_stream(Action::Ingest),
)
.app_data(web::PayloadConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE)),
.app_data(web::JsonConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE)),
)
.service(
web::resource("/metrics")
Expand All @@ -426,7 +426,7 @@ impl Server {
.to(ingest::handle_otel_metrics_ingestion)
.authorize_for_stream(Action::Ingest),
)
.app_data(web::PayloadConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE)),
.app_data(web::JsonConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE)),
)
.service(
web::resource("/traces")
Expand All @@ -435,7 +435,7 @@ impl Server {
.to(ingest::handle_otel_traces_ingestion)
.authorize_for_stream(Action::Ingest),
)
.app_data(web::PayloadConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE)),
.app_data(web::JsonConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE)),
)
}

Expand Down
Loading