You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
By default, an Axios instance is configured to follow redirects (301, 302, 307 and 308) automatically. However, you might want to exclude certain URLs from being opened, e.g. if they might contain malicious content or so.
Describe the solution you'd like
It would be nice to be able to specify one or more URL patterns or host names which to exclude in redirects. For instance, if a redirect would point to https://someevilwebsite.tld, it would be convenient to tell Axios not to go there, but abort the request instead.
Go's http.Client comes with a CheckRedirect handler, which fulfills exactly the purpose I described above. It might serve as an inspiration.
Describe alternatives you've considered
None
Additional context
None
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
By default, an Axios instance is configured to follow redirects (
301
,302
,307
and308
) automatically. However, you might want to exclude certain URLs from being opened, e.g. if they might contain malicious content or so.Describe the solution you'd like
It would be nice to be able to specify one or more URL patterns or host names which to exclude in redirects. For instance, if a redirect would point to
https://someevilwebsite.tld
, it would be convenient to tell Axios not to go there, but abort the request instead.Go's
http.Client
comes with aCheckRedirect
handler, which fulfills exactly the purpose I described above. It might serve as an inspiration.Describe alternatives you've considered
None
Additional context
None
The text was updated successfully, but these errors were encountered: