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
616 B

#pragma once
#include "webserv.hpp"
2 years ago
class Route {
2 years ago
protected:
2 years ago
Server *_server;
string _location;
2 years ago
string _root;
string _ret;
bool _autoindex;
2 years ago
2 years ago
public:
2 years ago
std::vector<string> _indexs;
std::vector<string> _headers;
std::map<string, string> _cgi;
2 years ago
Route(Server *server, string location, JSONNode *datas);
~Route(void);
string getLocation(void);
string getRoot(void);
string getReturn(void);
2 years ago
std::vector<string> getIndexsLst(void);
2 years ago
std::vector<string> getHeadersLst(void);
Server *getServer(void);
string getIndex(string uri, string path);
string correctUri(string uri);
2 years ago
friend class Socket;
2 years ago
};