最近腾讯出了峰值 200 Mbps 的轻量应用服务器,这么大的带宽,很适合用来取代 CDN 降低成本。
对于私有储存,可以设置授权策略,让轻量应用服务器无需鉴权即可访问对象存储。
界面:储存桶 -> 权限控制 -> Bucket 授权策略
轻量应用服务器内网 IP
location ^~ / {
# 替换成自己的 Bucket 域名(内网)
proxy_pass http://demo.oss-cn-shenzhen-internal.aliyuncs.com;
# 替换成自己的 Bucket 域名(内网)
proxy_set_header Host demo.oss-cn-shenzhen-internal.aliyuncs.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
}