void Logout_Handler(FCGIContext * context, char * params)
{
FCGI_ReleaseControl(context);
- FCGI_AcceptJSON(context, "Logged out", "0");
+ FCGI_SendControlCookie(context, false); //Unset the cookie
+ FCGI_AcceptJSON(context, "Logged out");
}
{
FCGI_EscapeText(context->user_name); //Don't break javascript pls
// Give the user a cookie
- FCGI_AcceptJSON(context, "Logged in", context->control_key);
+ FCGI_SendControlCookie(context, true); //Send the control key
+ FCGI_AcceptJSON(context, "Logged in");
Log(LOGDEBUG, "Successful authentication for %s", user);
}
else