### Describe the bug

According to the documentation the configuration option `beforeRedirect` should be called with response headers but it does not. Only the `options` parameter is passed to `beforeRedirect` (i.e. no `headers` parameter). 

```typescript
  // `beforeRedirect` defines a function that will be called before redirect.
  // Use this to adjust the request options upon redirecting,
  // to inspect the latest response headers,
  // or to cancel the request by throwing an error
  // If maxRedirects is set to 0, `beforeRedirect` is not used.
  beforeRedirect: (options, { headers }) => {
    if (options.hostname === "example.com") {
      options.auth = "user:password";
    }
  },
```
(copied from https://www.npmjs.com/package/axios/v/1.2.1#request-config)

This seems to be a duplicate of https://github.com/axios/axios/issues/5176.

### To Reproduce

```javascript
//var axios = require("axios@0.27.2") // works
//var axios = require("axios@1.0.0") // does not work
//var axios = require("axios@1.1.1") // does not work
//var axios = require("axios@1.1.2") // does not work
//var axios = require("axios@1.1.3") // does not work
//var axios = require("axios@1.2.0-alpha.1") // does not work
//var axios = require("axios@1.2.0") // does not work
var axios = require("axios") // does not work

// Works with an older version
// var axios = require("axios@0.27.2")
var express = require("express")
var app = express()

app.get('/redirect', (req, res) => {
  res.cookie("Hello", "World");
  res.redirect("/");
})

app.get('/', (req, res) => {
  res.send('Hello World!')
})

app.listen(3000, () => {
    axios.get("http://localhost:3000/redirect", {
        // Headers undefined
        beforeRedirect: (options, { headers }) => {
            console.log({options, headers});
        }
    });
});
```

### Code snippet

_No response_

### Expected behavior

`beforeRedirect` should be called with both the `options` and `headers` parameters.

### Axios Version

1.2.1

### Adapter Version

_No response_

### Browser

_No response_

### Browser Version

_No response_

### Node.js Version

_No response_

### OS

_No response_

### Additional Library Versions

_No response_

### Additional context/Screenshots

_No response_
index.d.ts
ders;
  config: InternalAxiosRequestConfig<D>;
  request?: any;
}
export class AxiosError<T = unknown, D = any> extends Error {
  constructor(
      message?: string,
      code?: string,
      config?: InternalAxiosRequestConfig<D>,
      request?: any,
      response?: AxiosResponse<T, D>
  );
  config?: InternalAxiosRequestConfig<D>;
  code?: string;
  request?: any;
  response?: AxiosResponse<T, D>;
  isAxiosError: boolean;
  status?: number;
  toJSON: () => object;
  cause?: Error;
  static from<T = unknown, D = any>(
    error: Error | unknown,
    code?: string,
    config?: InternalAxiosRequestConfig<D>,
    request?: any,
    response?: AxiosResponse<T, D>,
    customProps?: object,
): AxiosError<T, D>;
  static readonly ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
  static readonly ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
  static readonly ERR_BAD_OPTION = "ERR_BAD_OPTION";
  static readonly ERR_NETWORK = "ERR_NETWORK";
  static readonly ERR_DEPRECATED = "ERR_DEPRECATED";
  static readonly ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
  static readonly ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
  static readonly ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
  static readonly ERR_INVALID_URL = "ERR_INVALID_URL";
  static readonly ERR_CANCELED = "ERR_CANCELED";
  static readonly ECONNABORTED = "ECONNABORTED";
  static readonly ETIMEDOUT = "ETIMEDOUT";
}
export class CanceledError<T> extends AxiosError<T> {
}
export type AxiosPromise<T = any> = Promise<AxiosResponse<T>>;
export interface CancelStatic {
  new (message?: string): Cancel;
}
export interface Cancel {
  message: string | undefined;
}
export interface Canceler {
  (message?: string, config?: AxiosRequestConfig, request?: any): void;
}
export interface CancelTokenStatic {
  new (executor: (cancel: Canceler) => void): CancelToken;
  source(): CancelTokenSource;
}
export interface CancelToken {
  promise: Promise<Cancel>;
  reason?: Cancel;
  throwIfRequested(): void;
}
export interface CancelTokenSource 