ReviewOS

also looking at this

stacks/reportshq

fix(auth): send people to their reports, and make a dead redirect fail the build

#34
Merged glennmichael123 wants to merge fix/auth-redirects into main
5 files +59 -16
.github/workflows/ci.ymlmodified+10-1
Changes to .github/workflows/ci.yml
@@ -264,7 +264,16 @@ jobs:
264264 --retry 5 --retry-delay 5 --retry-all-errors --max-time 30 "$@"
265265 }
266266
267 for path in / /pricing /features /compare/metabase /docs /sitemap.xml /robots.txt; do
267 # /login, /register and /reports are here because the pages a stranger
268 # lands on were the only ones checked, and the break that mattered was
269 # one page further in: all three bounced to a `/projects` that had been
270 # deleted, and every probe above stayed green throughout.
271 #
272 # 200 is a weak assertion for /reports — it renders for an anonymous
273 # caller and lets AuthGuard bounce the browser, so curl sees the shell
274 # either way. It still catches the failures that matter here: a route
275 # that stopped being registered, and a page that 500s.
276 for path in / /pricing /features /compare/metabase /docs /sitemap.xml /robots.txt /login /register /reports; do
268277 code=$(probe "https://reportshq.org${path}")
269278 printf '%-24s %s\n' "$path" "$code"
270279 [ "$code" = "200" ] || fail=1