add robots meta tag handling

This commit is contained in:
41666 2019-03-20 05:39:54 -05:00
parent 1a7b042351
commit a98ba13f90
3 changed files with 14 additions and 10 deletions

View file

@ -55,8 +55,9 @@ const Code = styled.h1`
`
export default class CustomErrorPage extends React.Component {
static getInitialProps ({ res, err }) {
static getInitialProps ({ res, err, robots }) {
const statusCode = res ? res.statusCode : err ? err.statusCode : null
robots = 'NOINDEX, NOFOLLOW'
return { statusCode }
}