You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
691 B
29 lines
691 B
#pragma once
|
|
#include "webserv.hpp"
|
|
|
|
class Route {
|
|
protected:
|
|
Server *_server;
|
|
string _location, _root;
|
|
bool _autoindex;
|
|
|
|
public:
|
|
vec_string _indexs, _allowed_methods;
|
|
std::map<string, string> _cgi;
|
|
int _client_max_body_size;
|
|
int _timeout;
|
|
int _max_requests;
|
|
int _ret_code;
|
|
string _ret_uri;
|
|
std::map<int, string> _err_page;
|
|
|
|
Route(Server *server, string location, JSONNode *datas);
|
|
~Route(void);
|
|
string getLocation(void);
|
|
string get_custom_err(int error_code);
|
|
string getRoot(void);
|
|
string getReturn(void);
|
|
Server *getServer(void);
|
|
string getIndex(string uri, string path);
|
|
string correctUri(string uri);
|
|
};
|
|
|