Class CfnResponseHeadersPolicyPropsMixin.ResponseHeadersPolicyConfigProperty
A response headers policy configuration.
Inherited Members
Namespace: Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins
Assembly: Amazon.CDK.Mixins.Preview.dll
Syntax (csharp)
public class CfnResponseHeadersPolicyPropsMixin.ResponseHeadersPolicyConfigProperty : CfnResponseHeadersPolicyPropsMixin.IResponseHeadersPolicyConfigProperty
Syntax (vb)
Public Class CfnResponseHeadersPolicyPropsMixin.ResponseHeadersPolicyConfigProperty Implements CfnResponseHeadersPolicyPropsMixin.IResponseHeadersPolicyConfigProperty
Remarks
A response headers policy configuration contains metadata about the response headers policy, and configurations for sets of HTTP response headers.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins;
var responseHeadersPolicyConfigProperty = new ResponseHeadersPolicyConfigProperty {
Comment = "comment",
CorsConfig = new CorsConfigProperty {
AccessControlAllowCredentials = false,
AccessControlAllowHeaders = new AccessControlAllowHeadersProperty {
Items = new [] { "items" }
},
AccessControlAllowMethods = new AccessControlAllowMethodsProperty {
Items = new [] { "items" }
},
AccessControlAllowOrigins = new AccessControlAllowOriginsProperty {
Items = new [] { "items" }
},
AccessControlExposeHeaders = new AccessControlExposeHeadersProperty {
Items = new [] { "items" }
},
AccessControlMaxAgeSec = 123,
OriginOverride = false
},
CustomHeadersConfig = new CustomHeadersConfigProperty {
Items = new [] { new CustomHeaderProperty {
Header = "header",
Override = false,
Value = "value"
} }
},
Name = "name",
RemoveHeadersConfig = new RemoveHeadersConfigProperty {
Items = new [] { new RemoveHeaderProperty {
Header = "header"
} }
},
SecurityHeadersConfig = new SecurityHeadersConfigProperty {
ContentSecurityPolicy = new ContentSecurityPolicyProperty {
ContentSecurityPolicy = "contentSecurityPolicy",
Override = false
},
ContentTypeOptions = new ContentTypeOptionsProperty {
Override = false
},
FrameOptions = new FrameOptionsProperty {
FrameOption = "frameOption",
Override = false
},
ReferrerPolicy = new ReferrerPolicyProperty {
Override = false,
ReferrerPolicy = "referrerPolicy"
},
StrictTransportSecurity = new StrictTransportSecurityProperty {
AccessControlMaxAgeSec = 123,
IncludeSubdomains = false,
Override = false,
Preload = false
},
XssProtection = new XSSProtectionProperty {
ModeBlock = false,
Override = false,
Protection = false,
ReportUri = "reportUri"
}
},
ServerTimingHeadersConfig = new ServerTimingHeadersConfigProperty {
Enabled = false,
SamplingRate = 123
}
};
Synopsis
Constructors
| ResponseHeadersPolicyConfigProperty() | A response headers policy configuration. |
Properties
| Comment | A comment to describe the response headers policy. |
| CorsConfig | A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS). |
| CustomHeadersConfig | A configuration for a set of custom HTTP response headers. |
| Name | A name to identify the response headers policy. |
| RemoveHeadersConfig | A configuration for a set of HTTP headers to remove from the HTTP response. |
| SecurityHeadersConfig | A configuration for a set of security-related HTTP response headers. |
| ServerTimingHeadersConfig | A configuration for enabling the |
Constructors
ResponseHeadersPolicyConfigProperty()
A response headers policy configuration.
public ResponseHeadersPolicyConfigProperty()
Remarks
A response headers policy configuration contains metadata about the response headers policy, and configurations for sets of HTTP response headers.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins;
var responseHeadersPolicyConfigProperty = new ResponseHeadersPolicyConfigProperty {
Comment = "comment",
CorsConfig = new CorsConfigProperty {
AccessControlAllowCredentials = false,
AccessControlAllowHeaders = new AccessControlAllowHeadersProperty {
Items = new [] { "items" }
},
AccessControlAllowMethods = new AccessControlAllowMethodsProperty {
Items = new [] { "items" }
},
AccessControlAllowOrigins = new AccessControlAllowOriginsProperty {
Items = new [] { "items" }
},
AccessControlExposeHeaders = new AccessControlExposeHeadersProperty {
Items = new [] { "items" }
},
AccessControlMaxAgeSec = 123,
OriginOverride = false
},
CustomHeadersConfig = new CustomHeadersConfigProperty {
Items = new [] { new CustomHeaderProperty {
Header = "header",
Override = false,
Value = "value"
} }
},
Name = "name",
RemoveHeadersConfig = new RemoveHeadersConfigProperty {
Items = new [] { new RemoveHeaderProperty {
Header = "header"
} }
},
SecurityHeadersConfig = new SecurityHeadersConfigProperty {
ContentSecurityPolicy = new ContentSecurityPolicyProperty {
ContentSecurityPolicy = "contentSecurityPolicy",
Override = false
},
ContentTypeOptions = new ContentTypeOptionsProperty {
Override = false
},
FrameOptions = new FrameOptionsProperty {
FrameOption = "frameOption",
Override = false
},
ReferrerPolicy = new ReferrerPolicyProperty {
Override = false,
ReferrerPolicy = "referrerPolicy"
},
StrictTransportSecurity = new StrictTransportSecurityProperty {
AccessControlMaxAgeSec = 123,
IncludeSubdomains = false,
Override = false,
Preload = false
},
XssProtection = new XSSProtectionProperty {
ModeBlock = false,
Override = false,
Protection = false,
ReportUri = "reportUri"
}
},
ServerTimingHeadersConfig = new ServerTimingHeadersConfigProperty {
Enabled = false,
SamplingRate = 123
}
};
Properties
Comment
A comment to describe the response headers policy.
public string? Comment { get; set; }
Property Value
Remarks
The comment cannot be longer than 128 characters.
CorsConfig
A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).
public object? CorsConfig { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnResponseHeadersPolicyPropsMixin.ICorsConfigProperty
CustomHeadersConfig
A configuration for a set of custom HTTP response headers.
public object? CustomHeadersConfig { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnResponseHeadersPolicyPropsMixin.ICustomHeadersConfigProperty
Name
A name to identify the response headers policy.
public string? Name { get; set; }
Property Value
Remarks
The name must be unique for response headers policies in this AWS account .
RemoveHeadersConfig
A configuration for a set of HTTP headers to remove from the HTTP response.
public object? RemoveHeadersConfig { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnResponseHeadersPolicyPropsMixin.IRemoveHeadersConfigProperty
SecurityHeadersConfig
A configuration for a set of security-related HTTP response headers.
public object? SecurityHeadersConfig { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnResponseHeadersPolicyPropsMixin.ISecurityHeadersConfigProperty
ServerTimingHeadersConfig
A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFront.
public object? ServerTimingHeadersConfig { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnResponseHeadersPolicyPropsMixin.IServerTimingHeadersConfigProperty