File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "type" : " bugfix" ,
3
+ "category" : " region_config" ,
4
+ "description" : " Set signatureVersion to bearer explcitly when defined in service API"
5
+ }
Original file line number Diff line number Diff line change @@ -64,11 +64,20 @@ function configureEndpoint(service) {
64
64
65
65
// signature version
66
66
if ( ! config . signatureVersion ) {
67
- config . signatureVersion = ( service . api && service . api . signatureVersion ) || 'v4' ;
67
+ // Note: config is a global object and should not be mutated here.
68
+ // However, we are retaining this line for backwards compatibility.
69
+ // The non-v4 signatureVersion will be set in a copied object below.
70
+ config . signatureVersion = 'v4' ;
68
71
}
69
72
73
+ var useBearer = ( service . api && service . api . signatureVersion ) === 'bearer' ;
74
+
70
75
// merge config
71
- applyConfig ( service , config ) ;
76
+ applyConfig ( service , Object . assign (
77
+ { } ,
78
+ config ,
79
+ { signatureVersion : useBearer ? 'bearer' : config . signatureVersion }
80
+ ) ) ;
72
81
return ;
73
82
}
74
83
}
You can’t perform that action at this time.
0 commit comments