Files
42_INT_12_webserv/srcs/ServerConfig.hpp

67 lines
1.7 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ServerConfig.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: me <erlazo@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/23 15:55:16 by me #+# #+# */
/* Updated: 2022/07/23 16:19:43 by me ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef SERVERCONFIG_HPP
# define SERVERCONFIG_HPP
# include "LocationConfig.hpp"
//other includes
// a class that's all public? just so we have options?
class ServerConfig
{
public:
// i mean i guess i need some canonic stuff?
// although maybe if i make it a struct i can barebones it?
std::string server_name;
std::string root;
std::vector<std::string> index;
std::map<int, std::string> error_pages;
// i'm tempted to do something diff for storing method types...
std::vector<MethodType> allow_methods;
std::vector<LocationConfig> locations;
// might do something diff
struct timeval send_timeout;
struct timeval recv_timeout;
int client_body_limit;
bool autoindex;
// not sure what these look like in config file
int redirect_status;
std::string redirect_uri;
// is this the best way?
std::string host;
std::string port;
};
#endif