2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

fix: fixed missed dispatchBeforeRedirect argument (#5778)

Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
This commit is contained in:
Zao Soula
2024-01-24 22:57:06 +00:00
committed by GitHub
parent 123f354b92
commit a1938ff073
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -381,8 +381,8 @@ describe('supports http with nodejs', function () {
}).listen(4444, function () {
axios.get('http://localhost:4444/', {
maxRedirects: 3,
beforeRedirect: function (options) {
if (options.path === '/foo') {
beforeRedirect: function (options, responseDetails) {
if (options.path === '/foo' && responseDetails.headers.location === '/foo') {
throw new Error(
'Provided path is not allowed'
);