File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/server/components/charts-engine/components/request Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -432,12 +432,20 @@ export class RequestAxios {
432432 }
433433
434434 private static mapRequestOptions ( options : RequestOptions ) : AxiosRequestConfig {
435+ const normalizedHeaders = normalizeHeaders ( options . headers ) ;
436+
435437 const axiosConfig : AxiosRequestConfig = {
436438 url : options . uri || options . url ,
437439 method : options . method ,
438- headers : normalizeHeaders ( options . headers ) ,
440+ headers : normalizedHeaders ,
439441 timeout : options . timeout ,
440- maxRedirects : options . maxRedirects ?? 10 ,
442+ maxRedirects : options . maxRedirects ?? 0 ,
443+ beforeRedirect : ( redirectOptions ) => {
444+ // Preserve all original headers on redirect (matches request-promise-native behavior)
445+ if ( normalizedHeaders ) {
446+ Object . assign ( redirectOptions . headers , normalizedHeaders ) ;
447+ }
448+ } ,
441449 } ;
442450
443451 if ( options . body !== undefined ) {
You can’t perform that action at this time.
0 commit comments