### 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
e ParamEncoder {
  (value: any, defaultEncoder: (value: any) => any): any;
}
export interface CustomParamsSerializer {
  (params: Record<string, any>, options?: ParamsSerializerOptions): string;
}
export interface ParamsSerializerOptions extends SerializerOptions {
  encode?: ParamEncoder;
  serialize?: CustomParamsSerializer;
}
type MaxUploadRate = number;
type MaxDownloadRate = number;
type BrowserProgressEvent = any;
export interface AxiosProgressEvent {
  loaded: number;
  total?: number;
  progress?: number;
  bytes: number;
  rate?: number;
  estimated?: number;
  upload?: boolean;
  download?: boolean;
  event?: BrowserProgressEvent;
}
type Milliseconds = number;
type AxiosAdapterName = 'xhr' | 'http' | string;
type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
export type AddressFamily = 4 | 6 | undefined;
export interface LookupAddressEntry {
  address: string;
  family?: AddressFamily;
}
export type LookupAddress = string | LookupAddressEntry;
export interface AxiosRequestConfig<D = any> {
  url?: string;
  method?: Method | string;
  baseURL?: string;
  transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
  transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
  headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders;
  params?: any;
  paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer;
  data?: D;
  timeout?: Milliseconds;
  timeoutErrorMessage?: string;
  withCredentials?: boolean;
  adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
  auth?: AxiosBasicCredentials;
  responseType?: ResponseType;
  responseEncoding?: responseEncoding | string;
  xsrfCookieName?: string;
  xsrfHeaderName?: string;
  onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
  onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void;
  maxContentLength?: number;
  validateStatus?: ((status: number) => boolean) | null;
  maxBodyLength?: number;
  maxRedirects?: number;
  maxRate?: num