Repository navigation
Conversation
Resolve scoped API metadata before CORS and stop denied OPTIONS requests before authentication, uploads, or GraphQL. Preserve explicit fallback and localhost matching, and vary responses by Origin. Add origin edge cases and real-server regressions with ephemeral SQL reader fixtures covering preflight, metadata failures, auth, and CSRF. Refs constructive-io/constructive-planning#2422 and constructive-io/constructive-cloud#285. Origin policy and Cloud rollout remain separate.
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.
Configured per-API origins now participate in CORS decisions, and OPTIONS requests finish before authentication, uploads, or GraphQL execution.
Validation applies to
aeb59b74e440f20d743ebadf7c10d9ca46a8260b.pnpm --filter @constructive-io/graphql-server test --runInBandpnpm --filter graphql-server-test test --runInBand --runTestsByPath __tests__/cors.integration.test.tsThe HTTP regression exercises the production Server, metadata loaders, authentication, CSRF, and PostGraphile using disposable PostgreSQL fixtures. It does not validate production database policy, Cloud ingress, browser enforcement, or the broader integration suite.
Related: planning #2422, Cloud #285, and separate Cloud PR #287. Origin policy selection and activation remain outstanding. Explicit wildcard fallback still reflects arbitrary origins for resolved APIs; this runtime prerequisite does not complete #2422.