File tree Expand file tree Collapse file tree
lib/storage/data/external Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class AwsClient {
4242 this . _dataStoreName = config . dataStoreName ;
4343 this . _serverSideEncryption = config . serverSideEncryption ;
4444 this . _supportsVersioning = config . supportsVersioning ;
45- this . _vault = config . vault ;
45+ this . _vault = config . vault ;
4646 this . _disableContentSha256 = ! ! config . disableContentSha256 ;
4747
4848 this . _client = this . _buildS3Client ( this . _s3Params ) ;
@@ -56,8 +56,16 @@ class AwsClient {
5656 this . _installContentLengthMiddleware ( client ) ;
5757
5858 if ( this . _disableContentSha256 ) {
59- client . middlewareStack . remove ( 'flexibleChecksumsMiddleware' ) ;
60- client . middlewareStack . remove ( 'flexibleChecksumsMiddlewareOptions' ) ;
59+ [ 'flexibleChecksumsMiddleware' ,
60+ 'flexibleChecksumsInputMiddleware' ,
61+ 'flexibleChecksumsResponseMiddleware' ]
62+ . forEach ( name => {
63+ try {
64+ client . middlewareStack . remove ( name ) ;
65+ } catch ( _err ) {
66+ /* no-op: middleware may already be absent */
67+ }
68+ } ) ;
6169 }
6270
6371 return client ;
You can’t perform that action at this time.
0 commit comments