Skip to content

Commit

Permalink
fix(logging): not sign the empty body of the get remote config request (
Browse files Browse the repository at this point in the history
  • Loading branch information
NikaHsn authored Oct 13, 2023
1 parent b06bfcc commit 164c08d
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ base class BaseRemoteLoggingConstraintProvider
FileStorage? fileStorage,
}) : _fileStorage = fileStorage,
_config = config,
_awsHttpClient = AWSHttpClient() {
_awsHttpClient = AWSHttpClient()
..supportedProtocols = SupportedProtocols.http1 {
_init();
}

Expand Down Expand Up @@ -120,9 +121,10 @@ base class BaseRemoteLoggingConstraintProvider
jsonEncode(fetchedConstraint.toJson()),
);
}
} on Exception catch (exception) {
} on Object catch (exception, st) {
logger.error(
'Failed to fetch logging constraint from ${_config.endpoint}: $exception',
'Failed to fetch logging constraint from ${_config.endpoint}. exception: $exception, stack: $st',
st,
);
}
}
Expand Down Expand Up @@ -194,6 +196,7 @@ final class DefaultRemoteLoggingConstraintProvider
final signedRequest = await _signer.sign(
baseRequest,
credentialScope: scope,
serviceConfiguration: const ServiceConfiguration(signBody: false),
);

return signedRequest;
Expand Down

0 comments on commit 164c08d

Please sign in to comment.