fix(script): bound maxRedirects to 100 and reject out of range values

This commit is contained in:
aykhans committed 2026-09-24 19:08:58 +04:00
1 parent 9b0e7c4304
commit 878ca6dfbd
2 files changed
+9 -3

No files matched your search

+1 -1
View File
@@ -582,7 +582,7 @@ http(url, opts)
| `body` | string | `""` | Request body |
| `timeout` | duration string (`"500ms"`) | `30s` | Request timeout (the `timeout` config does not apply), applied to each hop when redirects are followed |
| `insecure` | boolean | `false` | Skip TLS verification (the `insecure` config does not apply) |
| `maxRedirects` | number | `0` | How many redirects to follow, `0` follows none |
| `maxRedirects` | number | `0` | How many redirects to follow, `0` follows none, maximum 100 |
Unknown options and values of the wrong type raise an error.