@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 |
boolean |
allowForwarded
If this is true and proxy address forwarding is enabled then the standard
Forwarded header will be used,
rather than the more common but not standard X-Forwarded-For . |
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
|
Optional<String> |
encryptionKey
The encryption key that is used to store persistent logins (e.g.
|
String |
host
The HTTP host
|
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
|
boolean |
proxyAddressForwarding
If this is true then the address, scheme etc will be set from headers forwarded by the proxy server, such as
X-Forwarded-For . |
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.
|
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", defaultValue="false") public boolean corsEnabled
@ConfigItem(defaultValue="8080") public int port
@ConfigItem(defaultValue="8081") public int testPort
@ConfigItem(defaultValue="0.0.0.0") public String host
@ConfigItem(defaultValue="true") public boolean hostEnabled
@ConfigItem(defaultValue="8443") public int sslPort
@ConfigItem(defaultValue="8444") public int testSslPort
@ConfigItem(defaultValue="false") public boolean proxyAddressForwarding
X-Forwarded-For
. This should only be set if you are behind a proxy that sets these headers.@ConfigItem(defaultValue="false") public 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(defaultValue="false") public boolean soReusePort
@ConfigItem(defaultValue="false") public boolean tcpQuickAck
@ConfigItem(defaultValue="false") public boolean tcpCork
@ConfigItem(defaultValue="false") public boolean tcpFastOpen
@ConfigItem(defaultValue="/var/run/io.quarkus.app.socket") public String domainSocket
@ConfigItem(defaultValue="false") public boolean domainSocketEnabled
@ConfigItem public boolean recordRequestStartTime
AccessLogConfig accessLog
public int determinePort(LaunchMode launchMode)
public int determineSslPort(LaunchMode launchMode)
Copyright © 2020 JBoss by Red Hat. All rights reserved.