fix(clawnch): target www canonical host so the backend is reachable (v0.17.3) - #42
Merged
Conversation
…v0.17.3) The apex clawn.ch 307-redirects to www.clawn.ch, but www.clawn.ch wasn't allowlisted and the HTTP client doesn't follow cross-host redirects (by design — following them would let an allowlisted host bypass the allowlist). Net effect: every Clawnch API call (agent registration, deploys, leaderboard / my_launches) failed with a 307 or NetworkAllowlistError. * lib/http.py: add www.clawn.ch to _DEFAULT_ALLOWLIST alongside the apex. * services/clawnch.py: default base URL -> https://www.clawn.ch (canonical, no redirect). CLAWNCH_BASE_URL still overrides. Verification: 4577 passed, 8 skipped; 100% coverage (16,249 stmts, 0 missing); ruff check + format clean; plugin.yaml byte-identical.
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.
Problem
The Clawnch apex
clawn.ch307-redirects to thewww.clawn.chcanonical host. But:www.clawn.chwas not on_DEFAULT_ALLOWLIST(only the apex was), andNet effect: every Clawnch API call failed — agent registration, token deploys, and
leaderboard/my_launchesreads — with either a 307 or aNetworkAllowlistError.Fix
lib/http.py: addwww.clawn.chto_DEFAULT_ALLOWLISTalongside the apex.services/clawnch.py: default base URL →https://www.clawn.ch(canonical, no redirect).CLAWNCH_BASE_URLstill overrides for staging/local.Redirect-following stays off (allowlist integrity). No user config change needed.
Verification
www.clawn.challowlisted, and clawnch default base ==https://www.clawn.ch.