summaryrefslogtreecommitdiff
path: root/cgithub/src/app.ts
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-09-10 00:53:48 -0400
committerJoe Mou <dev@mou.fo>2026-09-10 01:01:04 -0400
commit198f2a07f68a348dc0823b2bde3bec541e06db01 (patch)
tree96f43ed01ee804f1a90bedad6eecb90b86d5fb3c /cgithub/src/app.ts
parent95f4269f1a1c3b93ae2b060c7935b03c773e9f4a (diff)
Redirect /notifications instead of scraping it as an owner
A signed-out request for github.com/notifications is bounced to a login page, so the owner route followed that redirect and left the visitor on /login. Hand the path over to GitHub before it reaches the route.
Diffstat (limited to 'cgithub/src/app.ts')
-rw-r--r--cgithub/src/app.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/cgithub/src/app.ts b/cgithub/src/app.ts
index 7e5e9e8..0b9a7e6 100644
--- a/cgithub/src/app.ts
+++ b/cgithub/src/app.ts
@@ -95,6 +95,11 @@ export function createApp(eta: Eta) {
return c.render("home.eta");
});
+ // Exclusion that immediately redirects to GitHub.
+ app.get("/notifications", async (c) => {
+ return redirectToGitHub(c);
+ });
+
// GitHub's global search, which we only serve when it is scoped to a single
// repository: strip the qualifier and let that repository's search route
// decide what to do with the rest.