Commit 5822980
fix: stop bot-UA guard from silently blocking real customers in checkout
Bot UA detection (python-requests, curl) was forcing test mode in
/v1/keys/setup and /v1/keys/trial endpoints. Real SDK users calling
the API would get Stripe test sessions and could never pay.
Rate-limiting already protects against abuse.
- Remove bot-UA → test-mode forcing from both checkout endpoints
- Remove redundant _classify_visitor guard (covered by IP check)
- Keep bot classification for analytics/funnel attribution
- Update test to verify new behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 6eefe0c commit 5822980
2 files changed
Lines changed: 10 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
202 | | - | |
| 204 | + | |
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
206 | | - | |
207 | | - | |
| 208 | + | |
| 209 | + | |
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
| |||
214 | 216 | | |
215 | 217 | | |
216 | 218 | | |
217 | | - | |
218 | | - | |
| 219 | + | |
| 220 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
| 889 | + | |
894 | 890 | | |
895 | 891 | | |
896 | 892 | | |
| |||
1207 | 1203 | | |
1208 | 1204 | | |
1209 | 1205 | | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
| 1206 | + | |
1214 | 1207 | | |
1215 | 1208 | | |
1216 | 1209 | | |
| |||
0 commit comments