Commit c5c74a9
fix: Cloudflare 403 broke Power-trial start (missing User-Agent)
The REAL cause of 'Start trial does nothing' and the sign-in auto-start miss —
not a race. api.heard.dev is behind Cloudflare, which 403s a bare urllib request
(default UA). The daemon's /v1/me poll and its trial net send User-Agent, so they
worked; the sign-in enroll (_maybe_start_power_trial), the Settings button
(_act_start_power_trial), and the byok /v1/me refresh (_refresh_byok_enabled) did
NOT — so all three silently 403'd. Log confirmed: 'sign-in autostart failed: HTTP
Error 403: Forbidden' while 'power_trial_autostarted via=daemon_poll' succeeded.
Adds User-Agent to all three. Same CF-1010/403 class as the Groq key needing a
UA. persona.py already had one.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019GTBZjBGurqsHUHsjaU1gA1 parent 93d64fc commit c5c74a9
2 files changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
819 | | - | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
820 | 825 | | |
821 | 826 | | |
822 | 827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
127 | | - | |
| 129 | + | |
| 130 | + | |
128 | 131 | | |
129 | 132 | | |
130 | 133 | | |
| |||
0 commit comments