blob: e3f50b7d9af592b2c21dc152534b255216b5acee [file]
# SPDX-License-Identifier: Apache-2.0
####################################
# pekko-http Reference Config File #
####################################
# This is the reference config file that contains all the default settings.
# Make your edits/overrides in your application.conf.
pekko.http {
routing {
# Enables/disables the returning of more detailed error messages to the
# client in the error response
# Should be disabled for browser-facing APIs due to the risk of XSS attacks
# and (probably) enabled for internal or non-browser APIs
# (Note that pekko-http will always produce log messages containing the full error details)
verbose-error-messages = off
# Enables/disables ETag and `If-Modified-Since` support for FileAndResourceDirectives
file-get-conditional = on
# Enables/disables the rendering of the "rendered by" footer in directory listings
render-vanity-footer = yes
# The maximum size between two requested ranges. Ranges with less space in between will be coalesced.
#
# When multiple ranges are requested, a server may coalesce any of the ranges that overlap or that are separated
# by a gap that is smaller than the overhead of sending multiple parts, regardless of the order in which the
# corresponding byte-range-spec appeared in the received Range header field. Since the typical overhead between
# parts of a multipart/byteranges payload is around 80 bytes, depending on the selected representation's
# media type and the chosen boundary parameter length, it can be less efficient to transfer many small
# disjoint parts than it is to transfer the entire selected representation.
range-coalescing-threshold = 80
# The maximum number of allowed ranges per request.
# Requests with more ranges will be rejected due to DOS suspicion.
range-count-limit = 16
# The maximum number of bytes per ByteString a decoding directive will produce
# for an entity data stream.
decode-max-bytes-per-chunk = 1m
# Maximum content length after applying a decoding directive. When the directive
# decompresses, for example, an entity compressed with gzip, the resulting stream can be much
# larger than the max-content-length. Like with max-content-length, this is not necessarilly a
# problem when consuming the entity in a streaming fashion, but does risk high memory use
# when the entity is made strict or marshalled into an in-memory object.
# This limit (like max-content-length) can be overridden on a case-by-case basis using the
# withSizeLimit directive.
decode-max-size = 8m
}
# server-sent events
sse {
# The maximum size for parsing server-sent events. Set to 0 to disable limit entirely (unlimited).
max-event-size = 8192
# The maximum size for parsing lines of a server-sent event. Set to 0 to disable limit entirely (unlimited).
max-line-size = 4096
# How to handle lines that exceed max-line-size limit.
# Options:
# "fail-stream" - Fail the stream with a clear error message (default)
# "log-and-skip" - Log a warning and skip the oversized line, continue processing
# "truncate" - Log info and truncate the line to max-line-size, continue processing
# "dead-letter" - Send oversized line to dead letters, continue processing
oversized-line-handling = "fail-stream"
# How to handle events that exceed max-event-size limit.
# Options:
# "fail-stream" - Fail the stream with a clear error message (default)
# "log-and-skip" - Log a warning and skip the oversized event, continue processing
# "truncate" - Log info and drop lines that would exceed max-event-size, continue processing
# "dead-letter" - Send oversized event to dead letters, continue processing
oversized-event-handling = "fail-stream"
# Empty events are used by the pekko-http SSE infrastructure for heartbeats. Received heartbeats are ignored by default
# and not delivered in the user stream.
#
# This setting can be enabled to pass those empty events to the application for explicit handling.
emit-empty-events = off
}
}