react
next.js http header 적용하기
펀치맨
2022. 7. 15. 17:32
Strict Transport Security header 를 적용해 보자 !
# next.config.js
module.exports = {
...,
async headers() {
return [
{
source :'/(.*)',
headers : [
{
key: 'Strict-Transport-Security',
value: 'max-age=63072000;'
}
]
}
]
}
}
https://nextjs.org/docs/api-reference/next.config.js/headers
반응형