2014-08-28 38 views
0

我試圖爲我的資源設置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": "**/*[email protected](js|css)", 
     "headers": [ 
     { 
      "key": "Cache-Control", 
      "value": "max-age=31536000" 
     } 
     ] 
    }, 
    { 
     "source": "**/*[email protected](js|css|html)", 
     "headers": [ 
     { 
      "key": "Last-Modified", 
      "value": "Thu, 28 Aug 2014 16:25:05 GMT" 
     } 
     ] 
    } 
    ] 
} 

該文件看起來正確的格式,以及permission_denied錯誤使我相信,它的無法使用Firebase託管設置Last-Modified標頭。有任何想法嗎?

回答

2

至於解釋in the documentation

We currently only support the Cache-Control and the Access-Control-Allow-Origin headers as a key.

所以,不,你不能(目前)這樣做。