cloudflare R2 存储CORS 策略配置多域名的方法
cloudflare R2 存储CORS 策略配置多域名的方法
设置CORS策略解决静态资源跨域的问题
下面是cloudflare R2 存储CORS 策略配置多域名的方法,创建cloudflare R2 存储桶,上传,密匙不再详细累坠了
进入cloudflare R2 存储编辑CORS 策略,添加下面的代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[
{
"AllowedOrigins": [
"https://demo.net",
"https://www.demo.net",
"https://demo.com",
"https://www.demo.com"
],
"AllowedMethods": [
"GET"
],
"AllowedHeaders": [
"*"
]
}
]
1
2
"AllowedHeaders"
"*"
表示任意user agent 加载其中包括用户浏览器直接访问
💘 相关文章
- cloudflare支持域名注册和转入了
- cloudflare自定义域名防盗链
- 把域名从阿里云转出到了cloudflare
- cloudflare 推出了对象存储R2,amazon s3的强烈竞争对手
- how to do config nginx allow's cloudflare ip's
- Cloudflare 阻止了 1720 万 rps 的 DDoS 攻击——有史以来最大的一次
- Cloudflare推出少年版的公共dns服务器
- cloudflare也提供网站统计服务-Web Analytics
- Cloudflare not caching solution
- 老牌vps供应商linode提供免费3个月的对象存储服务