Skip to content

Commit 6ebf1a6

Browse files
committed
I hate declaration order requirements
1 parent e3c92e3 commit 6ebf1a6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/account_manager.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,12 @@ std::pair<ff::LoginStatus, std::string> ff::try_login(database& database, const
204204
response.session["key"] = key;
205205

206206
response.cookies.push_back({"username", base_username, .path = "/",
207+
.same_site = "Strict",
207208
.http_only = true,
208209
#ifndef FF_DEBUG
209210
.secure = true,
210211
#endif
211-
.same_site = "Strict"});
212+
});
212213

213214
limhamn::http::server::cookie c;
214215

@@ -221,11 +222,11 @@ std::pair<ff::LoginStatus, std::string> ff::try_login(database& database, const
221222

222223
response.cookies.push_back({"user_type", std::to_string(user_type),
223224
.path = "/",
225+
.same_site = "Strict",
224226
.http_only = true,
225227
#ifndef FF_DEBUG
226-
.secure = true,
228+
.secure = true,
227229
#endif
228-
.same_site = "Strict"
229230
});
230231

231232
return {ff::LoginStatus::Success, key};

0 commit comments

Comments
 (0)