Webserv
Loading...
Searching...
No Matches
Route.hpp
Go to the documentation of this file.
1#pragma once
2#include "webserv.hpp"
3
4class Route {
5protected:
9
10public:
12 std::map<string, string> _cgi;
14
15 Route(Server *server, string location, JSONNode *datas);
16 ~Route(void);
17 string getLocation(void);
18 string getRoot(void);
19 string getReturn(void);
21 string getIndex(string uri, string path);
22 string correctUri(string uri);
23};
Definition: Route.hpp:4
Server * _server
Definition: Route.hpp:6
std::map< string, string > _cgi
Definition: Route.hpp:12
vec_string _allowed_methods
Definition: Route.hpp:11
int _client_max_body_size
Definition: Route.hpp:13
string _root
Definition: Route.hpp:7
string correctUri(string uri)
Find the local path corresponding to the uri asked by te client.
Definition: Route.cpp:115
vec_string _indexs
Definition: Route.hpp:11
~Route(void)
Destructor.
Definition: Route.cpp:51
string _location
Definition: Route.hpp:7
string getLocation(void)
Definition: Route.cpp:54
bool _autoindex
Definition: Route.hpp:8
string getIndex(string uri, string path)
Search for an index while generating autoindex.
Definition: Route.cpp:66
string _ret
Definition: Route.hpp:7
Server * getServer(void)
string getReturn(void)
Definition: Route.cpp:56
string getRoot(void)
Definition: Route.cpp:55
Definition: Server.hpp:4
std::vector< string > vec_string
Definition: webserv.hpp:50