Add compliance pages, sitemap/robots, forgot-password flow, security headers, and route protections#120
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 GuideThis PR adds compliance-focused public pages, security headers, sitemap/robots endpoints, a safe forgot-password flow, and expands route protection and production readiness tests across the app and proxy layer. Sequence diagram for the new forgot-password flowsequenceDiagram
actor User
participant ForgotPasswordPage
participant ForgotPasswordAPI as POST_api_auth_forgot_password
participant RateLimiter as rateLimit
participant DB as db_user
participant AuditLog as emitAuditLog
User->>ForgotPasswordPage: Submit email
ForgotPasswordPage->>ForgotPasswordAPI: fetch POST /api/auth/forgot-password
ForgotPasswordAPI->>RateLimiter: rateLimit ipAddress
RateLimiter-->>ForgotPasswordAPI: limit
alt [rate limit exceeded]
ForgotPasswordAPI->>AuditLog: emitAuditLog (flow: forgot_password, reason: rate_limited)
ForgotPasswordAPI-->>ForgotPasswordPage: rateLimitedResponse (429, retryAfterSeconds)
ForgotPasswordPage-->>User: Show rate-limit message
else [within limit]
ForgotPasswordAPI->>ForgotPasswordAPI: request.json
ForgotPasswordAPI->>ForgotPasswordAPI: forgotPasswordSchema.safeParse
alt [invalid request]
ForgotPasswordAPI-->>ForgotPasswordPage: NextResponse.json (400, error)
ForgotPasswordPage-->>User: Show generic error
else [valid request]
ForgotPasswordAPI->>DB: db.user.findUnique (email)
DB-->>ForgotPasswordAPI: user | null
ForgotPasswordAPI->>AuditLog: emitAuditLog (flow: forgot_password, accepted)
ForgotPasswordAPI-->>ForgotPasswordPage: NextResponse.json (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 | 5981138 | Jun 28 2026, 02:00 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
Introduce compliance and recovery pages, strengthen security defaults, and tighten route protections for public vs protected areas.
New Features:
Enhancements:
Tests: