]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Redirect to home page on logout.
authorMichael R Sweet <msweet@msweet.org>
Fri, 16 May 2025 22:32:07 +0000 (18:32 -0400)
committerMichael R Sweet <msweet@msweet.org>
Fri, 16 May 2025 22:32:07 +0000 (18:32 -0400)
cgi-bin/home.c

index 22e8819f85e9c7af6ea22fb368c9eb2abed05cab..84c8d7e28a1449dd010541b173a9f80bd12916fd 100644 (file)
@@ -119,6 +119,8 @@ do_login(void)
     goto done;
   }
 
+  fprintf(stderr, "DEBUG2: do_login: oauth_uri=\"%s\"\n", oauth_uri);
+
   // Get the redirect URL...
   if (!strcmp(server_name, "localhost"))
     snprintf(redirect_uri, sizeof(redirect_uri), "http://127.0.0.1:%s/", server_port);
@@ -181,7 +183,7 @@ do_logout(void)
   cgiSetCookie("CUPS_BEARER", "", /*path*/NULL, /*domain*/NULL, time(NULL) - 1, /*secure*/0);
 
   // Redirect back to the referrer...
-  do_redirect(getenv("HTTP_REFERER"));
+  do_redirect("/");
 }