Add compliance pages, sitemap/robots, forgot-password flow, security headers, and route protections#117
Draft
support371 wants to merge 1 commit into
Draft
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
Reviewer's GuideAdds compliance-facing pages and machine-readable SEO endpoints, introduces a rate-limited forgot-password flow, hardens security headers, and tightens route protection and production readiness coverage. Sequence diagram for the new forgot-password flowsequenceDiagram
actor User
participant ForgotPasswordPage
participant ForgotPasswordRoute
participant RateLimiter
participant Database
participant AuditLogger
User->>ForgotPasswordPage: Submit email
ForgotPasswordPage->>ForgotPasswordRoute: POST /api/auth/forgot-password
ForgotPasswordRoute->>ForgotPasswordRoute: getRequestContext(request)
ForgotPasswordRoute->>RateLimiter: rateLimit(ipAddress, key, windowMs, max)
alt [rate limit exceeded]
RateLimiter-->>ForgotPasswordRoute: limit.ok = false
ForgotPasswordRoute->>AuditLogger: emitAuditLog(flow=forgot_password, reason=rate_limited)
ForgotPasswordRoute-->>ForgotPasswordPage: rateLimitedResponse(retryAfterSeconds)
ForgotPasswordPage-->>User: Show rate-limit message
else [within rate limit]
RateLimiter-->>ForgotPasswordRoute: limit.ok = true
ForgotPasswordRoute->>ForgotPasswordRoute: request.json()
ForgotPasswordRoute->>ForgotPasswordRoute: forgotPasswordSchema.safeParse(body)
alt [validation error]
ForgotPasswordRoute-->>ForgotPasswordPage: 400 Invalid request
ForgotPasswordPage-->>User: Show generic error
else [valid email]
ForgotPasswordRoute->>Database: db.user.findUnique({ where: { email } })
Database-->>ForgotPasswordRoute: user | null
ForgotPasswordRoute->>AuditLogger: emitAuditLog(flow=forgot_password, accepted=Boolean(user))
ForgotPasswordRoute-->>ForgotPasswordPage: SAFE_RESPONSE
ForgotPasswordPage-->>User: Show non-enumerating success message
end
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
gem-enterprise | 96ebdef | Jun 28 2026, 01:51 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
cookie-policy,trust-center,sitemap.xml, androbots.txtendpoints for compliance and SEO.Description
next.config.js, includingStrict-Transport-Security,Permissions-Policy, and aContent-Security-Policy-Report-Onlyentry, and added a redirect from/blogto/resources.src/app/api/auth/forgot-password/route.tswhich returns a safe, non-enumerating response.src/app/cookie-policy/page.tsx,src/app/trust-center/page.tsx,src/app/forgot-password/page.tsx,src/app/robots.txt/route.ts, andsrc/app/sitemap.xml/route.ts.src/components/Footer.tsx, addedcookie-policyandtrust-centertosrc/lib/siteRoutes.ts, removed the legacy redirect that previously forwarded/trust-center, and extendedsrc/proxy.tsto expand protected and admin route prefixes while marking the new compliance pages as public.src/__tests__/production-readiness.test.tsto assert presence of key pages, proxy protections, and footer linkage.Testing
vitestincluding the newproduction-readiness.test.ts, and all tests completed successfully.Codex Task
Summary by Sourcery
Add new public compliance pages, a secure forgot-password flow, SEO-friendly sitemap/robots endpoints, stricter security headers, and expanded route protections for authenticated and admin areas.
New Features:
Enhancements:
Tests: