mirror of
https://github.com/brianlovin/security-checklist.git
synced 2026-03-11 08:55:31 +00:00
21 lines
453 B
JavaScript
21 lines
453 B
JavaScript
// @flow
|
|
import * as React from 'react';
|
|
import type { GetInitialProps } from '../types';
|
|
import Home from './index';
|
|
|
|
class Error extends React.Component<{}> {
|
|
static async getInitialProps({ res }: GetInitialProps) {
|
|
if (res && res.setHeader) {
|
|
const cacheAge = 60 * 60 * 24 * 30;
|
|
res.setHeader('Cache-Control', `public,s-maxage=${cacheAge}`);
|
|
}
|
|
|
|
return {};
|
|
}
|
|
|
|
render() {
|
|
return <Home />;
|
|
}
|
|
}
|
|
|
|
export default Error;
|