#include <ServerConfiguration.h>
Configuration for an HTTP server (host, port, timeouts, TLS)
◆ ServerConfiguration()
| lintel::ServerConfiguration::ServerConfiguration |
( |
std::string |
host, |
|
|
int32_t |
port, |
|
|
const std::chrono::milliseconds & |
readTimeOut = std::chrono::milliseconds(0), |
|
|
const std::chrono::milliseconds & |
writeTimeOut = std::chrono::milliseconds(0), |
|
|
const std::chrono::milliseconds & |
idleInterval = std::chrono::milliseconds(0), |
|
|
std::filesystem::path |
certFile = "", |
|
|
std::filesystem::path |
keyFile = "", |
|
|
bool |
requireTls = false, |
|
|
std::vector< std::string > |
trustedProxies = {} |
|
) |
| |
- Parameters
-
| host | bind address |
| port | listen port |
| readTimeOut | read timeout (default 0 = no timeout) |
| writeTimeOut | write timeout |
| idleInterval | idle connection timeout |
| certFile | TLS certificate file path |
| keyFile | TLS key file path |
| requireTls | refuse to start if TLS is not configured |
| trustedProxies | IPs/CIDRs allowed to forward X-Forwarded-For |
◆ getCertFile()
| const std::filesystem::path & lintel::ServerConfiguration::getCertFile |
( |
| ) |
const |
- Returns
- the TLS certificate file path
◆ getHost()
| const std::string & lintel::ServerConfiguration::getHost |
( |
| ) |
const |
◆ getIdleInterval()
| const std::chrono::milliseconds & lintel::ServerConfiguration::getIdleInterval |
( |
| ) |
const |
◆ getKeyFile()
| const std::filesystem::path & lintel::ServerConfiguration::getKeyFile |
( |
| ) |
const |
- Returns
- the TLS key file path
◆ getPort()
◆ getReadTimeOut()
| const std::chrono::milliseconds & lintel::ServerConfiguration::getReadTimeOut |
( |
| ) |
const |
◆ getTrustedProxies()
| const std::vector< std::string > & lintel::ServerConfiguration::getTrustedProxies |
( |
| ) |
const |
- Returns
- IPs/CIDRs trusted to forward X-Forwarded-For
◆ getWriteTimeOut()
| const std::chrono::milliseconds & lintel::ServerConfiguration::getWriteTimeOut |
( |
| ) |
const |
◆ isTlsRequired()
| constexpr bool lintel::ServerConfiguration::isTlsRequired |
( |
| ) |
const |
|
inlineconstexpr |
- Returns
- true if the server must not start without TLS
◆ operator<<
Print configuration to stream
The documentation for this class was generated from the following file: