Community Plugin
View plugin on GitHubgatsby-plugin-vercel-deploy
Automatically generate vercel.json
from the gatsby project.
Install & Usage
yarn add gatsby-plugin-vercel-deploy
And add plugin to the gatsby-config.js
{
plugins: [
'gatsby-plugin-vercel-deploy',
],
}
Custom headers
You can define custom headers via plugin options.
{
plugins: [
{
resolve: 'gatsby-plugin-vercel-deploy',
options: {
headers: {
source: '/service-worker.js',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=0, must-revalidate',
},
],
},
{
source: '/(.*)',
headers: [
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'X-Frame-Options',
value: 'DENY',
},
{
key: 'X-XSS-Protection',
value: '1; mode=block',
},
],
},
},
},
],
}
LICENSE
MIT