update
This commit is contained in:
@@ -13,8 +13,9 @@ std::string getSessionId(const crow::request& req) {
|
||||
auto cookie_header = req.get_header_value("Cookie");
|
||||
std::string prefix = "session_id=";
|
||||
auto pos = cookie_header.find(prefix);
|
||||
if (pos == std::string::npos) return "";
|
||||
return cookie_header.substr(pos + prefix.size(), 32);
|
||||
if (pos == std::string::npos)
|
||||
return "";
|
||||
return cookie_header.substr(pos + prefix.size(), Session::SESSION_ID_SIZE);
|
||||
}
|
||||
|
||||
bool isLoggedIn(const crow::request& req) {
|
||||
|
||||
Reference in New Issue
Block a user