BUG: SetupRequired middleware blocks /health, /s/*, and /api/* before initial setup #108
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
merge-ready
merge-ready
needs-checks
needs-checks
needs-rebase
needs-rebase
needs-review
needs-review
needs-rework
needs-rework
notplanned
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/upaas#108
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: HIGH
File & Line
internal/middleware/middleware.go:394-430andinternal/server/routes.go:29Description
SetupRequiredis applied as global middleware on ALL routes (s.router.Use(s.mw.SetupRequired())). When no user exists (fresh install), it redirects everything except/setupto/setup.This breaks:
/health— returns 303 redirect instead of 200 JSON. Load balancers and monitoring systems will consider the service down during the setup window./s/*(static assets) — CSS/JS for the setup page itself cannot load, so the setup page renders unstyled./api/v1/*— API routes get HTML redirects instead of JSON errors./webhook/*— webhooks return redirects.Impact
Suggested Fix
Exempt paths that should work without setup: