Commit 702b1c0
fix(api): widen dual-stack fallback process-wide
Move the IPv6-to-IPv4 fallback timeout from per-request https agents to a
single process-wide setting.
The per-request agents only covered four axios calls, so `detectRegion` in
src/utils/urls.ts still failed first, along with the oauth, provisioning
and MCP profile calls. Setting the Node default covers every client in the
process, including posthog-node, the agent SDK and MCP.
Replaces the two mock-based tests, which asserted the config object was
passed rather than that the timeout changed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent c6335fb commit 702b1c0
7 files changed
Lines changed: 51 additions & 81 deletions
File tree
- src/lib
- __tests__
- programs/posthog-doctor
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | 6 | | |
14 | 7 | | |
15 | 8 | | |
| |||
155 | 148 | | |
156 | 149 | | |
157 | 150 | | |
158 | | - | |
159 | 151 | | |
160 | 152 | | |
161 | 153 | | |
| |||
195 | 187 | | |
196 | 188 | | |
197 | 189 | | |
198 | | - | |
199 | 190 | | |
200 | 191 | | |
201 | 192 | | |
| |||
224 | 215 | | |
225 | 216 | | |
226 | 217 | | |
227 | | - | |
228 | 218 | | |
229 | 219 | | |
230 | 220 | | |
| |||
263 | 253 | | |
264 | 254 | | |
265 | 255 | | |
266 | | - | |
267 | 256 | | |
268 | 257 | | |
269 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
0 commit comments