Skip to content

Commit c737df8

Browse files
committed
username and user_type should expire at the same time
1 parent 3576e40 commit c737df8

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/path_handlers.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2427,6 +2427,18 @@ limhamn::http::server::response ff::handle_api_stay_logged_in(const limhamn::htt
24272427
.same_site = "Strict",
24282428
.path = "/",
24292429
});
2430+
for (const auto& it : request.cookies) {
2431+
if (it.name == "username" || it.name == "user_type") {
2432+
response.cookies.push_back(limhamn::http::server::cookie{
2433+
.name = it.name,
2434+
.expires = expires,
2435+
.value = it.value,
2436+
.http_only = true,
2437+
.same_site = "Strict",
2438+
.path = "/",
2439+
});
2440+
}
2441+
}
24302442

24312443
response.http_status = 204;
24322444
response.body = "";

0 commit comments

Comments
 (0)