@ConfigRoot(phase=RUN_TIME) public class HttpConfiguration extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpConfiguration.InsecureRequests |
| Modifier and Type | Field and Description |
|---|---|
(package private) AccessLogConfig |
accessLog |
Optional<Boolean> |
allowForwarded
Deprecated.
use quarkus.http.proxy.allow-forwarded instead.
|
BodyConfig |
body
Request body related settings
|
CORSConfig |
cors
The CORS config
|
boolean |
corsEnabled
Enable the CORS filter.
|
String |
domainSocket
Path to a unix domain socket
|
boolean |
domainSocketEnabled
Enable listening to host:port
|
boolean |
enableCompression
If responses should be compressed.
|
Optional<String> |
encryptionKey
The encryption key that is used to store persistent logins (e.g.
|
String |
host
The HTTP host
In 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.
|
boolean |
hostEnabled
Enable listening to host:port
|
boolean |
http2
If this is true (the default) then HTTP/2 will be enabled.
|
Duration |
idleTimeout
Http connection idle timeout
|
HttpConfiguration.InsecureRequests |
insecureRequests
If insecure (i.e.
|
OptionalInt |
ioThreads
The number if IO threads used to perform IO.
|
ServerLimitsConfig |
limits
Server limits configuration
|
int |
port
The HTTP port
|
ProxyConfig |
proxy |
Optional<Boolean> |
proxyAddressForwarding
Deprecated.
use quarkus.http.proxy.proxy-address-forwarding instead.
|
Duration |
readTimeout
Http connection read timeout for blocking IO.
|
boolean |
recordRequestStartTime
If this is true then the request start time will be recorded to enable logging of total request time.
|
Map<String,SameSiteCookieConfig> |
sameSiteCookie
Configuration that allows setting the same site attributes for cookies.
|
boolean |
soReusePort
Enable socket reuse port (linux/macOs native transport only)
|
ServerSslConfig |
ssl
The SSL config
|
int |
sslPort
The HTTPS port
|
boolean |
tcpCork
Enable tcp cork (linux native transport only)
|
boolean |
tcpFastOpen
Enable tcp fast open (linux native transport only)
|
boolean |
tcpQuickAck
Enable tcp quick ack (linux native transport only)
|
int |
testPort
The HTTP port used to run tests
|
int |
testSslPort
The HTTPS port used to run tests
|
| Constructor and Description |
|---|
HttpConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
int |
determinePort(LaunchMode launchMode) |
int |
determineSslPort(LaunchMode launchMode) |
@ConfigItem(name="cors") public boolean corsEnabled
@ConfigItem(defaultValue="8080") public int port
@ConfigItem(defaultValue="8081") public int testPort
@ConfigItem public String host
@ConfigItem(defaultValue="true") public boolean hostEnabled
@ConfigItem(defaultValue="8443") public int sslPort
@ConfigItem(defaultValue="8444") public int testSslPort
@Deprecated @ConfigItem public Optional<Boolean> proxyAddressForwarding
X-Forwarded-For. This should only be set if you are behind a proxy that sets these headers.@Deprecated @ConfigItem public Optional<Boolean> allowForwarded
Forwarded header will be used,
rather than the more common but not standard X-Forwarded-For.@ConfigItem(defaultValue="enabled") public HttpConfiguration.InsecureRequests insecureRequests
enabled
then http works as normal. redirect will still open the http port, but
all requests will be redirected to the HTTPS port. disabled will prevent the HTTP
port from opening at all.@ConfigItem(defaultValue="true") public boolean http2
public CORSConfig cors
public ServerSslConfig ssl
@ConfigItem public OptionalInt ioThreads
public ServerLimitsConfig limits
@ConfigItem(defaultValue="30M", name="idle-timeout") public Duration idleTimeout
@ConfigItem(defaultValue="60s", name="read-timeout") public Duration readTimeout
public BodyConfig body
@ConfigItem(name="auth.session.encryption-key") public Optional<String> encryptionKey
@ConfigItem public boolean soReusePort
@ConfigItem public boolean tcpQuickAck
@ConfigItem public boolean tcpCork
@ConfigItem public boolean tcpFastOpen
@ConfigItem(defaultValue="/var/run/io.quarkus.app.socket") public String domainSocket
@ConfigItem public boolean domainSocketEnabled
@ConfigItem public boolean recordRequestStartTime
AccessLogConfig accessLog
@ConfigItem public Map<String,SameSiteCookieConfig> sameSiteCookie
@ConfigItem public boolean enableCompression
public ProxyConfig proxy
public int determinePort(LaunchMode launchMode)
public int determineSslPort(LaunchMode launchMode)
Copyright © 2021 JBoss by Red Hat. All rights reserved.