Repository navigation
Add local dev tooling for testing the /purge console - #24
Merged
Merged
Conversation
Cloudflare Access blocked testing the operator console on a local dev server. Add an opt-in CF_ACCESS_DEV_BYPASS env var that skips JWT verification for local development only, wire a Vite dev proxy so /purge/catalog and /purge/execute reach the local backend, fix the Vite dev base path so purge/index.html is actually reachable at /purge/ in dev, and add a dev:purge script to run build+backend+Vite together. Also make the path-input placeholder reflect the selected service instead of always showing "wifinote". Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The .env.* gitignore pattern meant to cover local env variants (.env.local, etc.) also matched .env.example, so it was never actually committed even though the README links to it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
CF_ACCESS_DEV_BYPASSenv var that skips Cloudflare Access JWT verification for local development only (default off; must never be set in a deployed environment)./purge/catalogand/purge/executereach the local backend while runningnpm run dev.basepath — in dev mode it was stripping the/purge/prefix and serving the landing page instead of the operator console at/purge/; the production build (which needsbase: '/purge/'for asset URLs) is unaffected.npm run dev:purgeto build and run the backend + Vite together in one command, with no new dependency.wifinote.README.mdand.replworks/TECH_STACK.md.Test plan
npm run typechecknpm test(28 tests pass, including a newDB1config test for the dev bypass default)npm run buildnpm run dev:purge, opened/purge/in a browser, confirmed the service catalog loads and the placeholder updates when switching services/modes🤖 Generated with Claude Code