fix(forms): allow anonymous access to the public /f/[slug] page

The middleware PUBLIC_ROUTES allowlist did not include the public
form/waiver fill route, so unauthenticated visitors hitting
/f/<slug> were redirected to /login — making the entire public/
anonymous forms feature unreachable in production. Add '/f' to the
allowlist; only /f/[slug] lives under it (the /forms* management
routes do not match the '/f/' prefix and stay auth-gated). The page
already serves only published public forms and submitForm enforces
visibility, so this exposes nothing new.
This commit is contained in:
Moheeb Zara
2026-05-16 17:06:00 -07:00
parent 61403ad29f
commit 5a49ecb2cf
+5
View File
@@ -13,6 +13,11 @@ const PUBLIC_ROUTES = [
'/signup', '/signup',
'/auth', '/auth',
'/api/health', '/api/health',
// Public form / waiver fill page. Only /f/[slug] lives here and must be
// reachable anonymously (the page serves only published public forms and
// submitForm enforces visibility). The /forms* management routes do NOT
// match the '/f/' prefix and stay auth-gated.
'/f',
'/resources', '/resources',
'/zine', '/zine',
'/governance', '/governance',