libcex
1.0.0
Modern C++11 embedded webserver library
|
Structure transporting all configuration options of the embedded server. Note that certain middlewares have additional config structs (e. g. cex::filesystem ) More...
#include <core.hpp>
Public Member Functions | |
Config (Config &other) | |
Public Attributes | |
int | port |
HTTP/HTTPS listener port of the server. | |
std::string | address |
Bind address of the server. | |
bool | compress |
Globally enable compression of outgoing responses (default: true). More... | |
bool | parseSslInfo |
Flag indicating whether or not SSL client info shall be parsed for each request (default: true). More... | |
bool | sslEnabled |
Flag indicating whether or not SSL is enabled on the listener (default: false). | |
int | threadCount |
Controls the number of worker threads the server is going to use (default: 4). | |
Structure transporting all configuration options of the embedded server. Note that certain middlewares have additional config structs (e. g. cex::filesystem )
bool cex::Server::Config::compress |
Globally enable compression of outgoing responses (default: true).
This will enable gzip/deflate compression of responses if Accept-Encoding allows compressioni (default: false).
Compression can be enabled/disabled manually for a single request using the request flags. For example: res.get()->setFlags(res.get()->getFlags() | Response::fCompressGZip)
.
Library must be built with libz
to make this work.
bool cex::Server::Config::parseSslInfo |
Flag indicating whether or not SSL client info shall be parsed for each request (default: true).
This tries to extract the SSL certificate provided by the client and store it into a CertificateInfo structure within the requests sslClientCert
property.