← 所有代码文件

vercel.json

Vercel 配置:SPA 重写和安全响应头。

{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }],
  "headers": [
    {
      "source": "/(.*)",
      "headers": [{ "key": "X-Content-Type-Options", "value": "nosniff" }]
    }
  ]
}

关于此工具

Vercel 配置:SPA 重写和安全响应头。

开箱即用的 vercel.json——查看内容、复制,或以正确的文件名下载。免费,100% 在浏览器中运行。