Vercel自定义Header缓存时间

在项目根目录下新建vercel.json文件,内容如下:

{
  "headers": [
    {
      "source": "/img/favicon.png",
      "headers": [
        {
          "key": "Cache-Control",
          "value": "public, max-age=3600"
        }
      ]
    },
    {
      "source": "/assets/(.*)",
      "headers": [
        {
          "key": "Cache-Control",
          "value": "public, max-age=31556952, immutable"
        }
      ]
    }
  ]
}