-
Notifications
You must be signed in to change notification settings - Fork 576
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...ges/middleware-flexible-checksums/src/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { LoadedConfigSelectors } from "@smithy/node-config-provider"; | ||
|
||
import { RequestChecksumCalculation } from "./constants"; | ||
import { SelectorType, stringUnionSelector } from "./stringUnionSelector"; | ||
|
||
export const ENV_REQUEST_CHECKSUM_CALCULATION = "AWS_REQUEST_CHECKSUM_CALCULATION"; | ||
export const CONFIG_REQUEST_CHECKSUM_CALCULATION = "request_checksum_calculation"; | ||
export const DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED; | ||
|
||
export const NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS: LoadedConfigSelectors<string> = { | ||
environmentVariableSelector: (env) => | ||
stringUnionSelector(env, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.ENV), | ||
configFileSelector: (profile) => | ||
stringUnionSelector(profile, CONFIG_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.CONFIG), | ||
default: DEFAULT_REQUEST_CHECKSUM_CALCULATION, | ||
}; |
16 changes: 16 additions & 0 deletions
16
...ges/middleware-flexible-checksums/src/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { LoadedConfigSelectors } from "@smithy/node-config-provider"; | ||
|
||
import { RequestChecksumCalculation } from "./constants"; | ||
import { SelectorType, stringUnionSelector } from "./stringUnionSelector"; | ||
|
||
export const ENV_RESPONSE_CHECKSUM_VALIDATION = "AWS_RESPONSE_CHECKSUM_VALIDATION"; | ||
export const CONFIG_RESPONSE_CHECKSUM_VALIDATION = "response_checksum_validation"; | ||
export const DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED; | ||
|
||
export const NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS: LoadedConfigSelectors<string> = { | ||
environmentVariableSelector: (env) => | ||
stringUnionSelector(env, ENV_RESPONSE_CHECKSUM_VALIDATION, RequestChecksumCalculation, SelectorType.ENV), | ||
configFileSelector: (profile) => | ||
stringUnionSelector(profile, CONFIG_RESPONSE_CHECKSUM_VALIDATION, RequestChecksumCalculation, SelectorType.CONFIG), | ||
default: DEFAULT_RESPONSE_CHECKSUM_VALIDATION, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * from "./NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS"; | ||
export * from "./NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS"; | ||
export * from "./constants"; | ||
export * from "./flexibleChecksumsMiddleware"; | ||
export * from "./getFlexibleChecksumsPlugin"; |