我使用Google App Engine上传了客户的网页,并且运行正常。这是一个非常简单的网页,包含12个静态文件(全部为.html)
我必须删除该文件,但我不知道是否可以通过修改app.yaml或 main.py
例如:我有www.example.com/page.html
,我想要www.example.com/page
我正在尝试限制对S3存储桶的访问,并且只允许基于引用者的列表中的某些域.
存储桶策略基本上是:
{
"Version": "2012-10-17",
"Id": "http referer domain lock",
"Statement": [
{
"Sid": "Allow get requests originating from specific domains",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example.com/*",
"Condition": {
"StringLike": {
"aws:Referer": [
"*othersite1.com/*",
"*othersite2.com/*",
"*othersite3.com/*"
]
}
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
这个otherite1,2和3调用一个对象,我已经存储在域example.com下的s3存储桶中.我还有一个附加到存储桶的云端分发.我在字符串条件之前和之后使用*通配符.引用者可以是othersite1.com/folder/another-folder/page.html.引用者也可以使用http或https.
我不知道为什么我得到403 Forbidden错误.
我这样做基本上是因为我不希望其他网站调用该对象.
任何帮助将不胜感激.