ok we started moving stuff over but for now it's not all working yet
This commit is contained in:
66
srcs/ServerConfig.hpp
Normal file
66
srcs/ServerConfig.hpp
Normal file
@@ -0,0 +1,66 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user