куча мелких изменений в вебе

This commit is contained in:
2024-11-07 18:07:06 +03:00
parent 4a293e10f6
commit fae7a2ffc8
5 changed files with 161 additions and 47 deletions

View File

@@ -162,7 +162,7 @@ public:
}));
s.resources.emplace_back(std::make_unique<http::resource::GenericResource>("/logout", [this](const auto& req, auto& rep) {
if (req.method == "GET") {
http::server::httpRedirect(rep, "/");
http::server::httpRedirect(rep, "/login");
rep.headers.push_back({.name = "Set-Cookie", .value = http::auth::jwt::EMPTY_AUTH_COOKIE});
} else {
http::server::stockReply(http::server::bad_request, rep);