@@ -318,7 +318,8 @@ impl Server {
318318 . to ( logstream:: delete)
319319 . authorize_for_stream ( Action :: DeleteStream ) ,
320320 )
321- . app_data ( web:: PayloadConfig :: default ( ) . limit ( MAX_EVENT_PAYLOAD_SIZE ) ) ,
321+ . app_data ( web:: PayloadConfig :: default ( ) . limit ( MAX_EVENT_PAYLOAD_SIZE ) ) // Required to restrict `PUT /logstream/{logstream}`
322+ . app_data ( web:: JsonConfig :: default ( ) . limit ( MAX_EVENT_PAYLOAD_SIZE ) ) ,
322323 )
323324 . service (
324325 // GET "/logstream/{logstream}/info" ==> Get info for given log stream
@@ -404,7 +405,7 @@ impl Server {
404405 . to ( ingest:: ingest)
405406 . authorize_for_stream ( Action :: Ingest ) ,
406407 )
407- . app_data ( web:: PayloadConfig :: default ( ) . limit ( MAX_EVENT_PAYLOAD_SIZE ) )
408+ . app_data ( web:: JsonConfig :: default ( ) . limit ( MAX_EVENT_PAYLOAD_SIZE ) )
408409 }
409410
410411 // /v1/logs endpoint to be used for OTEL log ingestion only
@@ -417,7 +418,7 @@ impl Server {
417418 . to ( ingest:: handle_otel_logs_ingestion)
418419 . authorize_for_stream ( Action :: Ingest ) ,
419420 )
420- . app_data ( web:: PayloadConfig :: default ( ) . limit ( MAX_EVENT_PAYLOAD_SIZE ) ) ,
421+ . app_data ( web:: JsonConfig :: default ( ) . limit ( MAX_EVENT_PAYLOAD_SIZE ) ) ,
421422 )
422423 . service (
423424 web:: resource ( "/metrics" )
@@ -426,7 +427,7 @@ impl Server {
426427 . to ( ingest:: handle_otel_metrics_ingestion)
427428 . authorize_for_stream ( Action :: Ingest ) ,
428429 )
429- . app_data ( web:: PayloadConfig :: default ( ) . limit ( MAX_EVENT_PAYLOAD_SIZE ) ) ,
430+ . app_data ( web:: JsonConfig :: default ( ) . limit ( MAX_EVENT_PAYLOAD_SIZE ) ) ,
430431 )
431432 . service (
432433 web:: resource ( "/traces" )
@@ -435,7 +436,7 @@ impl Server {
435436 . to ( ingest:: handle_otel_traces_ingestion)
436437 . authorize_for_stream ( Action :: Ingest ) ,
437438 )
438- . app_data ( web:: PayloadConfig :: default ( ) . limit ( MAX_EVENT_PAYLOAD_SIZE ) ) ,
439+ . app_data ( web:: JsonConfig :: default ( ) . limit ( MAX_EVENT_PAYLOAD_SIZE ) ) ,
439440 )
440441 }
441442
0 commit comments