#include <ServerConf.hpp>
Definition at line 19 of file ServerConf.hpp.
◆ ServerConf() [1/2]
| ServerConf::ServerConf |
( |
| ) |
|
◆ ServerConf() [2/2]
| ServerConf::ServerConf |
( |
const ServerConf & |
other | ) |
|
◆ ~ServerConf()
| ServerConf::~ServerConf |
( |
| ) |
|
◆ operator=()
◆ getServerName()
| const std::string & ServerConf::getServerName |
( |
| ) |
const |
◆ getInterfacePortPair()
| const struct sockaddr_in & ServerConf::getInterfacePortPair |
( |
| ) |
const |
◆ getMaxBodySize()
| size_t ServerConf::getMaxBodySize |
( |
| ) |
const |
◆ getLocations()
| const std::vector< LocationConf > & ServerConf::getLocations |
( |
| ) |
const |
◆ getErrorPages()
| const std::map< std::string, std::string > & ServerConf::getErrorPages |
( |
| ) |
const |
◆ setServerName()
| void ServerConf::setServerName |
( |
const std::string & |
name | ) |
|
◆ setInterfacePortPair()
| void ServerConf::setInterfacePortPair |
( |
const struct sockaddr_in & |
address | ) |
|
◆ setMaxBodySize()
| void ServerConf::setMaxBodySize |
( |
size_t |
size | ) |
|
◆ addLocation()
| void ServerConf::addLocation |
( |
const LocationConf & |
location | ) |
|
◆ addErrorPage()
| void ServerConf::addErrorPage |
( |
const std::string & |
errorCode, |
|
|
const std::string & |
errorPagePath |
|
) |
| |
Adds a custom error page mapping (e.g., "404" -> "/errors/404.html").
Definition at line 80 of file ServerConf.cpp.
◆ getErrorPagePath()
| std::string ServerConf::getErrorPagePath |
( |
const std::string & |
errorCode | ) |
const |
Retrieves the path to a custom error page if one exists.
- Parameters
-
| errorCode | The HTTP error code as a string (e.g., "404"). |
- Returns
- The path to the custom error page, or an empty string if none is defined.
Definition at line 85 of file ServerConf.cpp.
◆ setDefaults()
| void ServerConf::setDefaults |
( |
| ) |
|
|
inline |
Set the Defaults config directives.
Definition at line 63 of file ServerConf.hpp.
◆ _serverName
| std::string ServerConf::_serverName |
|
private |
◆ _interfacePortPair
| struct sockaddr_in ServerConf::_interfacePortPair |
|
private |
◆ _maxBodySize
| size_t ServerConf::_maxBodySize |
|
private |
◆ _locations
◆ _errorPages
| std::map<std::string, std::string> ServerConf::_errorPages |
|
private |
The documentation for this class was generated from the following files: