我尝试为我的资源设置Last-Modified
标头,以便可以正确缓存它们。但是,当我运行firebase deploy
时,我收到以下错误:
FIREBASE WARNING: set at /hosting/headers/dstaley failed: permission_denied
Settings Error - Incorrectly formatted "headers" entry in the firebase.json
我的firebase.json如下:
{
"firebase": "dstaley",
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source": "**/*.@(js|css)",
"headers": [
{
"key": "Cache-Control",
"value": "max-age=31536000"
}
]
},
{
"source": "**/*.@(js|css|html)",
"headers": [
{
"key": "Last-Modified",
"value": "Thu, 28 Aug 2014 16:25:05 GMT"
}
]
}
]
}
该文件看起来格式正确,permission_denied
错误导致我认为无法使用Firebase托管设置Last-Modified
标头。有什么想法吗?
答案 0 :(得分:2)