diff options
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -6,8 +6,7 @@ #include <unordered_set> #include <vector> -namespace fs = std::filesystem; - +// URL path, not FS struct Path { std::string requested; // the requested path @@ -21,8 +20,8 @@ struct Site // std::string name; is the index in the m_sites map std::unordered_set<std::string> hosts; std::vector<Path> paths; - fs::path cert_path; - fs::path key_path; + std::filesystem::path cert_path; + std::filesystem::path key_path; }; enum class SocketProtocol @@ -43,9 +42,9 @@ struct Socket class Config { - const std::string default_filename{"/etc/webserver.conf"}; + const std::filesystem::path default_filename{"/etc/webserver.conf"}; - void readConfigfile(std::string filename); + void readConfigfile(const std::filesystem::path& filename); void expand_socket_sites(); void validate(); void create_look_up_table(); @@ -58,7 +57,7 @@ class Config std::vector<Socket> m_sockets; public: - Config(const std::string& filename); + Config(const std::filesystem::path& filename); // Data getters std::string User() const; |