rsnext/examples/headers/next.config.js

25 lines
428 B
JavaScript
Raw Normal View History

module.exports = {
async headers() {
return [
{
source: '/about',
headers: [
{
key: 'X-About-Custom-Header',
value: 'about_header_value',
},
],
},
{
source: '/news/:id',
headers: [
{
key: 'X-News-Custom-Header',
value: 'news_header_value',
},
],
},
]
},
}