1 回答
- 最新
- 投票最多
- 评论最多
0
【以下的回答经过翻译处理】 您需要创建自己的自定义策略。您可以在CLI中描述托管策略以获取JSON输出,然后在CloudFront中使用该输出来创建自定义策略。请参见:
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-responseheaderspolicy.html
- https://docs.aws.amazon.com/cli/latest/reference/cloudfront/get-response-headers-policy.html
aws cloudfront get-response-headers-policy --id 67f7725c-6f97-4210-82d7-5512b31e9d03
{
"ETag": "E23ZP02F085DFQ",
"ResponseHeadersPolicy": {
"Id": "67f7725c-6f97-4210-82d7-5512b31e9d03",
"LastModifiedTime": "1970-01-01T00:00:00+00:00",
"ResponseHeadersPolicyConfig": {
"Comment": "在每个响应中添加一组安全头",
"Name": "Managed-SecurityHeadersPolicy",
"SecurityHeadersConfig": {
"XSSProtection": {
"Override": false,
"Protection": true,
"ModeBlock": true
},
"FrameOptions": {
"Override": false,
"FrameOption": "SAMEORIGIN"
},
"ReferrerPolicy": {
"Override": false,
"ReferrerPolicy": "strict-origin-when-cross-origin"
},
"ContentSecurityPolicy": {},
"ContentTypeOptions": {
"Override": true
},
"StrictTransportSecurity": {
"Override": false,
"AccessControlMaxAgeSec": 31536000
}
}
}
}
}
相关内容
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前