undici
undici copied to clipboard
Redirect Handler throwOnMaxRedirect
Would like to have an option where the redirect handler throws on max redirects instead of just forwarding the result.
@metcoder95
It should be a matter of calling this.abort(new Error('max redirects')
if the flag is set to true, right here: https://github.com/nodejs/undici/blob/ba4ca327843de62a83c1f9c32acc303bd6b8545f/lib/handler/RedirectHandler.js#L90-L92
Do you have something else to cover in mind?
https://github.com/nodejs/undici/pull/2546
@metcoder95
See #951 as commented in #2260 the redirect interceptor and handler seem to lack any meaningful direct unit tests
landed: https://github.com/nodejs/undici/commit/a7551ce4e2f9d0f8ee1b5a44d4c429aae6d85abb
can I turn this issue off ?