Interface VertxHttpConfig
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptionintThe accept backlog, this is how many connections can be waiting to be accepted before connections start being rejectedAccess logs.The format for Netty activity log data.auth()Authentication configurationbody()Request body related settingsintMinimum response body size (in bytes) to trigger compression. 0 means compress everything when compression is enabled.cors()The CORS configintThe initial buffer size for the HTTP/1.x decoder.default intdeterminePort(io.quarkus.runtime.LaunchMode launchMode) default Stringdefault intdetermineSslPort(io.quarkus.runtime.LaunchMode launchMode) Path to a Unix Domain Socket.booleanEnable listening on a Unix Domain Socket.The encryption key that is used to store persistent logins (e.g. for form auth).filter()Additional HTTP configuration per pathbooleanWhen set totrue, the HTTP server automatically sends `100 CONTINUE` response when the request expects it (with the `Expect: 100-Continue` header).header()Additional HTTP Headers always sent in the responsehost()The HTTP hostbooleanEnable listening to host:portThe HTTP Host header validationbooleanhttp2()If this is true (the default) then HTTP/2 will be enabled.Set the default HTTP/2 connection window size.The maximum number of small HTTP/2 CONTINUATION frames allowed per request before the connection is closed.booleanEnables or Disable the HTTP/2 Push feature.Http connection idle timeoutSet the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 setting.If insecure (i.e. http rather than https) requests are allowed.The number if IO threads used to perform IO.limits()Server limits.booleanEnable Netty-level wire logging for the HTTP server.intport()The HTTP portproxy()Proxy.The timeout for the PROXY protocol handshake.Read-specific idle timeout. 0 means disabled.Http connection read timeout for blocking IO.Socket receive buffer size.booleanIf this is true then the request start time will be recorded to enable logging of total request time.booleanEnable address reuse on the server socket.Configuration that allows setting the same site attributes for cookies.Socket send buffer size.intsoLinger()Socket linger timeout in seconds. -1 means disabled.booleanEnable socket reuse port (linux/macOs native transport only)ssl()The SSL configsslHost()The HTTPS host.intsslPort()The HTTPS portStatic Resources.booleantcpCork()Enable tcp cork (linux native transport only)booleanEnable tcp fast open (linux native transport only)booleanEnable TCP keepalive.booleanEnable tcp quick ack (linux native transport only)TCP user timeout (linux native transport only). 0 means disabled.testHost()Used whenQuarkusIntegrationTestis meant to execute against an application that is already running and listening on the host specified by this property.inttestPort()The HTTP port used to run testsUsed whenQuarkusIntegrationTestis meant to execute against an application that is already running to configure the test to use SSL.intThe HTTPS port used to run testsThe name of the TLS configuration to use.intThe value of the IP traffic class (TOS field) for outgoing packets.Traffic shaping.Provides a hint (optional) for the default content type of responses generated for the errors not handled by the application.booleanWhether the HTTP server should treat the semicolon (;) as a query parameter delimiter, in addition to the ampersand (&).WebSocket Server configuration.Write-specific idle timeout. 0 means disabled.
-
Method Details
-
auth
Authentication configuration -
port
@WithDefault("8080") int port()The HTTP port -
testPort
@WithDefault("8081") int testPort()The HTTP port used to run tests -
host
String host()The HTTP hostIn dev/test mode this defaults to localhost, in prod mode this defaults to 0.0.0.0
Defaulting to 0.0.0.0 makes it easier to deploy Quarkus to container, however it is not suitable for dev/test mode as other people on the network can connect to your development machine.
As an exception, when running in Windows Subsystem for Linux (WSL), the HTTP host defaults to 0.0.0.0 even in dev/test mode since using localhost makes the application inaccessible.
-
sslHost
The HTTPS host.When not set, defaults to the value of
host().This allows binding plain HTTP and HTTPS to different network interfaces. For example, HTTP can listen on
127.0.0.1for local administration while HTTPS listens on0.0.0.0for remote clients. -
testHost
Used whenQuarkusIntegrationTestis meant to execute against an application that is already running and listening on the host specified by this property. -
hostEnabled
@WithDefault("true") boolean hostEnabled()Enable listening to host:port -
sslPort
@WithDefault("8443") int sslPort()The HTTPS port -
testSslPort
@WithDefault("8444") int testSslPort()The HTTPS port used to run tests -
testSslEnabled
Used whenQuarkusIntegrationTestis meant to execute against an application that is already running to configure the test to use SSL. -
insecureRequests
Optional<VertxHttpConfig.InsecureRequests> insecureRequests()If insecure (i.e. http rather than https) requests are allowed. If this isenabledthen http works as normal.redirectwill still open the http port, but all requests will be redirected to the HTTPS port.disabledwill prevent the HTTP port from opening at all.Default is
enabledexcept when client auth is set torequired(configured usingquarkus.http.ssl.client-auth=required). In this case, the default isdisabled. -
http2
@WithDefault("true") boolean http2()If this is true (the default) then HTTP/2 will be enabled.Note that for browsers to be able to use it HTTPS must be enabled.
-
http2PushEnabled
@WithDefault("true") boolean http2PushEnabled()Enables or Disable the HTTP/2 Push feature. This setting can be used to disable server push. The server will not send aPUSH_PROMISEframe if it receives this parameter set tofalse. -
http2ConnectionWindowSize
Set the default HTTP/2 connection window size. It overrides the initial window size set byHttp2Settings.getInitialWindowSize(), so the connection window size is greater than for its streams, in order the data throughput. A value of-1reuses the initial window size setting. -
cors
The CORS config -
hostValidation
The HTTP Host header validation -
ssl
ServerSslConfig ssl()The SSL config -
tlsConfigurationName
The name of the TLS configuration to use.If not set and the default TLS configuration is configured (
quarkus.tls.*) then that will be used. If a name is configured, it uses the configuration fromquarkus.tls.<name>.*If a name is configured, but no TLS configuration is found with that name then an error will be thrown.If no TLS configuration is set, and
quarkus.tls.*is not configured, then, `quarkus.http.ssl` will be used. -
staticResources
Static Resources. -
handle100ContinueAutomatically
@WithName("handle-100-continue-automatically") @WithDefault("false") boolean handle100ContinueAutomatically()When set totrue, the HTTP server automatically sends `100 CONTINUE` response when the request expects it (with the `Expect: 100-Continue` header). -
ioThreads
OptionalInt ioThreads()The number if IO threads used to perform IO. This will be automatically set to a reasonable value based on the number of CPU cores if it is not provided. If this is set to a higher value than the number of Vert.x event loops then it will be capped at the number of event loops.In general this should be controlled by setting quarkus.vertx.event-loops-pool-size, this setting should only be used if you want to limit the number of HTTP io threads to a smaller number than the total number of IO threads.
-
limits
Server limits. -
idleTimeout
Http connection idle timeout -
readTimeout
Http connection read timeout for blocking IO. This is the maximum amount of time a thread will wait for data, before an IOException will be thrown and the connection closed. -
body
BodyConfig body()Request body related settings -
encryptionKey
The encryption key that is used to store persistent logins (e.g. for form auth). Logins are stored in a persistent cookie that is encrypted with AES-256 using a key derived from a SHA-256 hash of the key that is provided here.If no key is provided then an in-memory one will be generated, this will change on every restart though so it is not suitable for production environments. This must be more than 16 characters long for security reasons
-
soReusePort
@WithDefault("false") boolean soReusePort()Enable socket reuse port (linux/macOs native transport only) -
tcpQuickAck
@WithDefault("false") boolean tcpQuickAck()Enable tcp quick ack (linux native transport only) -
tcpCork
@WithDefault("false") boolean tcpCork()Enable tcp cork (linux native transport only) -
tcpFastOpen
@WithDefault("false") boolean tcpFastOpen()Enable tcp fast open (linux native transport only) -
useSemicolonAsQueryParamDelimiter
@WithDefault("false") boolean useSemicolonAsQueryParamDelimiter()Whether the HTTP server should treat the semicolon (;) as a query parameter delimiter, in addition to the ampersand (&).When set to
true, a request like/path?a=1;b=2is parsed as two parameters (a=1andb=2). When set tofalse(the default), the semicolon is treated as a literal character and the request yields a single parameter (a=1;b=2). -
tcpUserTimeout
TCP user timeout (linux native transport only). 0 means disabled. -
soLinger
@WithDefault("-1") int soLinger()Socket linger timeout in seconds. -1 means disabled. -
sendBufferSize
OptionalInt sendBufferSize()Socket send buffer size. When not set, the OS default is used. -
receiveBufferSize
OptionalInt receiveBufferSize()Socket receive buffer size. When not set, the OS default is used. -
readIdleTimeout
Read-specific idle timeout. 0 means disabled.Unlike the general
idleTimeout(), this timeout only considers read activity. -
writeIdleTimeout
Write-specific idle timeout. 0 means disabled.Unlike the general
idleTimeout(), this timeout only considers write activity. -
compressionContentSizeThreshold
@WithDefault("0") int compressionContentSizeThreshold()Minimum response body size (in bytes) to trigger compression. 0 means compress everything when compression is enabled. -
acceptBacklog
@WithDefault("-1") int acceptBacklog()The accept backlog, this is how many connections can be waiting to be accepted before connections start being rejected -
initialWindowSize
OptionalInt initialWindowSize()Set the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 setting. Indicates the sender's initial window size (in octets) for stream-level flow control. The initial value is2^16-1(65,535) octets. -
proxyProtocolTimeout
The timeout for the PROXY protocol handshake. When the PROXY protocol is enabled (quarkus.http.proxy.use-proxy-protocol=true), this configures how long the server waits for the PROXY protocol header before closing the connection. -
http2MaxSmallContinuationFrames
OptionalInt http2MaxSmallContinuationFrames()The maximum number of small HTTP/2 CONTINUATION frames allowed per request before the connection is closed. This protects against HTTP/2 CONTINUATION flood attacks. Setting zero or a negative value disables the protection. -
decoderInitialBufferSize
@WithDefault("128") int decoderInitialBufferSize()The initial buffer size for the HTTP/1.x decoder.This is an advanced setting. The initial buffer size used by the HTTP/1.x decoder. A larger buffer can improve performance when processing large headers but increases memory usage.
-
tcpKeepAlive
@WithDefault("false") boolean tcpKeepAlive()Enable TCP keepalive.This is an advanced setting. When enabled, the server sends TCP keepalive probes to detect dead connections.
-
logActivity
@WithDefault("false") boolean logActivity()Enable Netty-level wire logging for the HTTP server.This is an advanced setting. When enabled, all bytes sent and received on the server are logged at DEBUG level using the Netty logging handler. This produces a large volume of logs.
-
activityLogDataFormat
The format for Netty activity log data. Only used whenlog-activityis enabled.This is an advanced setting.
-
reuseAddress
@WithDefault("true") boolean reuseAddress()Enable address reuse on the server socket.This is an advanced setting. When enabled, the
SO_REUSEADDRoption is set on the server socket. -
trafficClass
@WithDefault("-1") int trafficClass()The value of the IP traffic class (TOS field) for outgoing packets.This is an advanced setting. Valid values range from 0 to 255. A value of
-1(the default) means the traffic class is not set. -
domainSocket
Path to a Unix Domain Socket. -
domainSocketEnabled
@WithDefault("false") boolean domainSocketEnabled()Enable listening on a Unix Domain Socket. -
recordRequestStartTime
@WithDefault("false") boolean recordRequestStartTime()If this is true then the request start time will be recorded to enable logging of total request time.This has a small performance penalty, so is disabled by default.
-
accessLog
Access logs. -
trafficShaping
Traffic shaping. -
sameSiteCookie
Map<String,SameSiteCookieConfig> sameSiteCookie()Configuration that allows setting the same site attributes for cookies. -
unhandledErrorContentTypeDefault
Optional<VertxHttpConfig.PayloadHint> unhandledErrorContentTypeDefault()Provides a hint (optional) for the default content type of responses generated for the errors not handled by the application.If the client requested a supported content-type in request headers (e.g. "Accept: application/json", "Accept: text/html"), Quarkus will use that content type.
Otherwise, it will default to the content type configured here.
-
header
Additional HTTP Headers always sent in the response -
filter
Additional HTTP configuration per path -
proxy
Proxy. -
websocketServer
WebSocket Server configuration. -
determinePort
default int determinePort(io.quarkus.runtime.LaunchMode launchMode) -
determineSslPort
default int determineSslPort(io.quarkus.runtime.LaunchMode launchMode) -
determineSslHost
-