79420457

Date: 2025-02-07 10:03:47
Score: 0.5
Natty:
Report link

Since the official methods I have seen so far seem inefficient for this part of the project, I used the following method to set two cookies to make the project work:

String cookieHeader = "ESPSESSIONID=" + sessionId + "; Path=/; Expires=" + expires + "; HttpOnly\r\n"
                  "Set-Cookie: UserRole=" + role + "; Path=/; Expires=" + expires;
response->addHeader("Set-Cookie", cookieHeader);
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Amin Mashayekhan