INNER CODE UNIT · JavaScript
headers
gadingnst/fullstack-next-template · headers.config.js:2
function headers() {
return [
{
// Enable CORS
source: '/api/(.*)',
headers: [
{ key: 'Access-Control-Allow-Credentials', value: 'true' },
/** disable configuration below if you want same origin */
{ key: 'Access-Control-Allow-Origin', value: '*' },
{ key: 'Access-Control-Allow-Methods', value: 'GET,OPTIONS,PATCH,DELETE,POST,PUT' },
{ key: 'Access-Control-Allow-Headers', value: 'X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version, Authorization' }
]
},
{
source: '/(.*)',
headers: [
{
key: 'X-XSS-Protection',