-
-
Notifications
You must be signed in to change notification settings - Fork 273
fix: use www.clawhub.ai as default registry to prevent auth header stripping on redirect #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: use www.clawhub.ai as default registry to prevent auth header stripping on redirect #101
Conversation
…ripping on redirect (openclaw#100) clawhub.ai redirects to www.clawhub.ai via 307, which strips the Authorization header per standard cross-origin HTTP security rules. This causes all authenticated CLI commands to fail with 'Unauthorized'. Update DEFAULT_SITE and DEFAULT_REGISTRY to https://www.clawhub.ai and align .well-known/clawhub.json discovery endpoints accordingly. Also fixes openclaw#41, openclaw#72, openclaw#99.
|
@IISweetHeartII is attempting to deploy a commit to the Amantus Machina Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
Additional Comments (1)
This PR changes the CLI/site defaults to Also appears in: Prompt To Fix With AIThis is a comment left during a code review.
Path: convex/lib/webhooks.ts
Line: 19:21
Comment:
[P1] Default SITE_URL still points at non-www domain
This PR changes the CLI/site defaults to `https://www.clawhub.ai` to avoid the `clawhub.ai -> www` redirect, but `convex/lib/webhooks.ts` still defaults `SITE_URL` to `https://clawhub.ai`. Any Discord webhook payloads that rely on the default will keep generating links to the redirecting host, which is inconsistent with the new canonical URL.
Also appears in: `convex/lib/webhooks.test.ts:23,39,53,68,70,84`.
How can I resolve this? If you propose a fix, please make it concise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Suggestion:
README documentation references old default site URL 'https://clawhub.ai' instead of the new default 'https://www.clawhub.ai'
| export const DEFAULT_SITE = 'https://clawhub.ai' | ||
| export const DEFAULT_REGISTRY = 'https://clawhub.ai' | ||
| export const DEFAULT_SITE = 'https://www.clawhub.ai' | ||
| export const DEFAULT_REGISTRY = 'https://www.clawhub.ai' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
clawhub.aireturns a 307 redirect towww.clawhub.ai. Per standard HTTP security rules, theAuthorizationheader is stripped on cross-origin redirects. This causes all authenticated CLI commands (publish,whoami,sync,delete, etc.) to fail with "Unauthorized" unless the user manually passes--registry https://www.clawhub.ai.Root Cause
DEFAULT_SITEandDEFAULT_REGISTRYinpackages/clawdhub/src/cli/registry.tspoint tohttps://clawhub.ai(withoutwww).well-known/clawhub.jsondiscovery file also returns non-www URLshttps://clawhub.aihttps://www.clawhub.aiAuthorizationheader (cross-origin security)www.clawhub.aiwithout auth → "Unauthorized"Fix
DEFAULT_SITEandDEFAULT_REGISTRYtohttps://www.clawhub.aipublic/.well-known/clawhub.jsonto usewww.clawhub.aifor all endpointsTesting
Related Issues
Fixes #100
Also fixes #41, #72, #99
All of these report the same symptom: CLI returns "Unauthorized" after successful login, which is caused by the auth header being stripped during the non-www → www redirect.
Greptile Overview
Greptile Summary
This PR updates the CLI’s default
site/registryURLs and the.well-known/clawhub.jsondiscovery document to usehttps://www.clawhub.aiinstead ofhttps://clawhub.ai, avoiding a cross-origin 307 redirect that stripsAuthorizationheaders and breaks authenticated commands. Test fixtures and e2e defaults were updated accordingly.One inconsistency remains: the Convex Discord webhook helper still defaults
SITE_URLto the non-www domain, so webhook-generated links may continue pointing at the redirecting host instead of the new canonical URL.Confidence Score: 4/5
convex/lib/webhooks.tsthat still points to the redirecting non-www domain, which could lead to inconsistent links.(2/5) Greptile learns from your feedback when you react with thumbs up/down!
Context used:
dashboard- AGENTS.md (source)