CustomResponseHeader
- class aws_cdk.aws_amplify_alpha.CustomResponseHeader(*, headers, pattern, app_root=None)
Bases:
object
(experimental) Custom response header of an Amplify App.
- Parameters:
headers (
Mapping
[str
,str
]) – (experimental) The map of custom headers to be applied.pattern (
str
) – (experimental) These custom headers will be applied to all URL file paths that match this pattern.app_root (
Optional
[str
]) – (experimental) If the app uses a monorepo structure, the appRoot from the build spec to apply the custom headers to. Default: - The appRoot is omitted in the custom headers output.
- Stability:
experimental
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_amplify_alpha as amplify_alpha custom_response_header = amplify_alpha.CustomResponseHeader( headers={ "headers_key": "headers" }, pattern="pattern", # the properties below are optional app_root="appRoot" )
Attributes
- app_root
(experimental) If the app uses a monorepo structure, the appRoot from the build spec to apply the custom headers to.
- Default:
The appRoot is omitted in the custom headers output.
- Stability:
experimental
- headers
(experimental) The map of custom headers to be applied.
- Stability:
experimental
- pattern
(experimental) These custom headers will be applied to all URL file paths that match this pattern.
- Stability:
experimental