cdn-setup
1
总安装量
1
周安装量
#47756
全站排名
安装命令
npx skills add https://github.com/bagelhole/devops-security-agent-skills --skill cdn-setup
Agent 安装分布
opencode
1
codex
1
claude-code
1
Skill 文档
CDN Setup
Configure content delivery networks.
AWS CloudFront
aws cloudfront create-distribution --distribution-config '{
"CallerReference": "my-distribution",
"Origins": {
"Quantity": 1,
"Items": [{
"Id": "myS3Origin",
"DomainName": "mybucket.s3.amazonaws.com",
"S3OriginConfig": {"OriginAccessIdentity": ""}
}]
},
"DefaultCacheBehavior": {
"TargetOriginId": "myS3Origin",
"ViewerProtocolPolicy": "redirect-to-https",
"CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6"
},
"Enabled": true
}'
Cloudflare
# Via API
curl -X POST "https://api.cloudflare.com/client/v4/zones" \
-H "Authorization: Bearer $TOKEN" \
-d '{"name":"example.com","jump_start":true}'
Cache Headers
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 30d;
add_header Cache-Control "public, immutable";
}
Best Practices
- Set appropriate cache headers
- Use cache invalidation sparingly
- Implement cache warming
- Monitor cache hit ratios