feat: add password protection for wildcard services#249
Merged
just-be-dev merged 2 commits intomainfrom Mar 21, 2026
Merged
Conversation
Add optional HTTP Basic Auth password protection to any wildcard subdomain service. Passwords are stored as Cloudflare Worker secrets and referenced by name in deploy.json. The deploy script interactively provisions missing secrets via 'wrangler secret put'. - Add optional 'password' field to all route config types - Implement HTTP Basic Auth check in worker before handler dispatch - Add checkBasicAuth() and unauthorizedResponse() utility functions - Add secret management in deploy script (list, prompt, upload) - Add comprehensive tests for auth functions - Update deploy.json schema for password field
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
just-be-dev | 35d613d | Commit Preview URL Branch Preview URL |
Mar 21 2026, 08:24 PM |
- @just-be/wildcard: 0.6.0 -> 0.7.0 - @just-be/deploy: 0.10.0 -> 0.11.0 - @just-be/wildcard-service: 1.0.0 -> 1.1.0 Co-Authored-By: Claude Opus 4.6 (1M context) <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.
I just want to be able to put up some non-public personal sites.
AI Summary
Adds optional HTTP Basic Auth password protection to wildcard subdomains. Passwords are stored as Cloudflare Worker secrets and referenced by name in
deploy.json. The deploy script interactively provisions missing secrets viawrangler secret put.Key changes:
passwordfield to all route config types (static, redirect, rewrite)checkBasicAuth()andunauthorizedResponse()utility functionswrangler secret putUsage: Add
"password": "SECRET_NAME"to any rule indeploy.json. On deploy, the script checks if the secret exists; if not, it prompts for the value interactively.