Adds HTTP security header checks

This commit is contained in:
Alicia Sykes
2023-08-12 16:08:06 +01:00
parent efba42d59d
commit 1e8d6e868c
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import { Card } from 'components/Form/Card';
import Row from 'components/Form/Row';
const HttpSecurityCard = (props: { data: any, title: string, actionButtons: any }): JSX.Element => {
const data = props.data;
return (
<Card heading={props.title} actionButtons={props.actionButtons}>
<Row lbl="Content Security Policy" val={data.contentSecurityPolicy ? '✅ Yes' : '❌ No' } />
<Row lbl="Strict Transport Policy" val={data.strictTransportPolicy ? '✅ Yes' : '❌ No' } />
<Row lbl="X-Content-Type-Options" val={data.xContentTypeOptions ? '✅ Yes' : '❌ No' } />
<Row lbl="X-Frame-Options" val={data.xFrameOptions ? '✅ Yes' : '❌ No' } />
<Row lbl="X-XSS-Protection" val={data.xXSSProtection ? '✅ Yes' : '❌ No' } />
</Card>
);
}
export default HttpSecurityCard;