Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dispatchBeforeRedirect #5729

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: dispatchBeforeRedirect
  • Loading branch information
k1de committed Jun 2, 2023
commit 8b5cab4e318cb7cbecbfecdf0a6ff49b7e3cc70a
4 changes: 2 additions & 2 deletions dist/node/axios.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2474,12 +2474,12 @@ const supportedProtocols = platform.protocols.map(protocol => {
*
* @returns {Object<string, any>}
*/
function dispatchBeforeRedirect(options) {
function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
if (options.beforeRedirects.proxy) {
options.beforeRedirects.proxy(options);
}
if (options.beforeRedirects.config) {
options.beforeRedirects.config(options);
options.beforeRedirects.config(options, responseDetails, requestDetails);
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/adapters/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ const supportedProtocols = platform.protocols.map(protocol => {
*
* @returns {Object<string, any>}
*/
function dispatchBeforeRedirect(options) {
function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
if (options.beforeRedirects.proxy) {
options.beforeRedirects.proxy(options);
}
if (options.beforeRedirects.config) {
options.beforeRedirects.config(options);
options.beforeRedirects.config(options, responseDetails, requestDetails);
}
}

Expand Down