Add playground and Chrome receipt-inspector foundation; scoped CORS for /api/verify#351
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
/api/verifywithout opening admin or payment endpoints.Description
api/verify.jswith an allowlist forhttps://www.commandlayer.org,https://commandlayer.org, andchrome-extension://*, returning204forOPTIONS, and addingAccess-Control-Allow-*headers.public/playground.htmlas a lightweight playground UI that picks a verb, accepts text, loads a sample receipt, shows a clear fallback ("Live runtime unavailable. Use sample receipt."), and links into the existing verifier surface.docs/extension/chrome-receipt-inspector.mddescribing detection (clrcpt_[a-f0-9]{32}), verifier path, CORS needs, and receipt-ID lookup fallback.extension/chrome-receipt-inspector/(manifest, popup, popup.js, content.js, content.css, background.js, README) implementing a paste-and-verify popup and a content script that detects receipt-ID candidates, explicitly as a developer preview (no private keys, no admin/payment calls, no store publish).tests/api-verify.test.jsto expectAllow: POST,OPTIONSon 405 responses to match the new handler behavior while preserving the verification logic exercised by existing tests.public/verify.html; no changes to Stripe, admin auth, ENS provisioning, or ERC-8004 registration were made.Testing
npm testand all tests passed (65tests,0failures).npm run check:linksand it completed successfully with all local links resolved.cd examples/webhook-auto-verify && npm run checkand the example checks passed successfully.Codex Task