release: production-ready launch candidate#31
Conversation
…codex/release/production-ready
…o codex/release/production-ready # Conflicts: # docs/PRODUCTION_READINESS_GAPS.md
…ex/release/production-ready
…se/production-ready # Conflicts: # README.md # app/api/health/route.ts # app/api/stripe/checkout/route.ts # app/api/stripe/portal/route.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5eacbdd44
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // If no origin/referrer is provided, do not hard-fail to avoid blocking non-browser clients. | ||
| return true; |
There was a problem hiding this comment.
Reject malformed Origin headers in request-origin guard
When the request includes an unparsable Origin value (for example Origin: null from opaque/sandboxed browser contexts), parseOrigin returns null and the function falls through to the permissive branch that returns true. Because the Stripe mutation routes now depend on this helper for CSRF protection in production, those malformed-origin browser requests are accepted instead of denied.
Useful? React with 👍 / 👎.
| const expectedOrigin = parseOrigin(appBaseUrl); | ||
| if (!expectedOrigin) return true; |
There was a problem hiding this comment.
Deny requests when expected app origin is unresolved
If appBaseUrl is missing or invalid, expectedOrigin becomes null and this helper immediately allows the request. That creates a fail-open path where production checkout/portal POSTs lose origin validation entirely during env misconfiguration, which defeats the protection this commit introduces.
Useful? React with 👍 / 👎.
This branch merges production launch work:
Do NOT merge the PR.