Skip to content

Commit c0ea9cb

Browse files
committed
Redirect to home page on logout.
1 parent ece4890 commit c0ea9cb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cgi-bin/home.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ do_login(void)
119119
goto done;
120120
}
121121

122+
fprintf(stderr, "DEBUG2: do_login: oauth_uri=\"%s\"\n", oauth_uri);
123+
122124
// Get the redirect URL...
123125
if (!strcmp(server_name, "localhost"))
124126
snprintf(redirect_uri, sizeof(redirect_uri), "http://127.0.0.1:%s/", server_port);
@@ -181,7 +183,7 @@ do_logout(void)
181183
cgiSetCookie("CUPS_BEARER", "", /*path*/NULL, /*domain*/NULL, time(NULL) - 1, /*secure*/0);
182184

183185
// Redirect back to the referrer...
184-
do_redirect(getenv("HTTP_REFERER"));
186+
do_redirect("/");
185187
}
186188

187189

0 commit comments

Comments
 (0)