Interface CfnResponseHeadersPolicy.IResponseHeadersPolicyConfigProperty
A response headers policy configuration.
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IResponseHeadersPolicyConfigProperty
Syntax (vb)
Public Interface 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.AWS.CloudFront;
var responseHeadersPolicyConfigProperty = new ResponseHeadersPolicyConfigProperty {
Name = "name",
// the properties below are optional
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" }
},
OriginOverride = false,
// the properties below are optional
AccessControlExposeHeaders = new AccessControlExposeHeadersProperty {
Items = new [] { "items" }
},
AccessControlMaxAgeSec = 123
},
CustomHeadersConfig = new CustomHeadersConfigProperty {
Items = new [] { new CustomHeaderProperty {
Header = "header",
Override = false,
Value = "value"
} }
},
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,
Override = false,
// the properties below are optional
IncludeSubdomains = false,
Preload = false
},
XssProtection = new XSSProtectionProperty {
Override = false,
Protection = false,
// the properties below are optional
ModeBlock = false,
ReportUri = "reportUri"
}
},
ServerTimingHeadersConfig = new ServerTimingHeadersConfigProperty {
Enabled = false,
// the properties below are optional
SamplingRate = 123
}
};
Synopsis
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 |
Properties
Comment
A comment to describe the response headers policy.
virtual string Comment { get; }
Property Value
System.String
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).
virtual object CorsConfig { get; }
Property Value
System.Object
Remarks
CustomHeadersConfig
A configuration for a set of custom HTTP response headers.
virtual object CustomHeadersConfig { get; }
Property Value
System.Object
Remarks
Name
A name to identify the response headers policy.
string Name { get; }
Property Value
System.String
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.
virtual object RemoveHeadersConfig { get; }
Property Value
System.Object
Remarks
SecurityHeadersConfig
A configuration for a set of security-related HTTP response headers.
virtual object SecurityHeadersConfig { get; }
Property Value
System.Object
Remarks
ServerTimingHeadersConfig
A configuration for enabling the Server-Timing
header in HTTP responses sent from CloudFront.
virtual object ServerTimingHeadersConfig { get; }
Property Value
System.Object