when the attacker relays and possibly alters the communication between two parties.
when external scripts inject malicious code to the client-side application
HTTP communication is unencrypted
iFrame shows a different page, identical to Login form. Attacker now has user credentials
HTTP communication is unencrypted
attacker now has free-reign on the Client-side runtime
HTTP communication is unencrypted
attacker now has free-reign on the Client-side runtime
attacker add invisible layers on top of buttons and interactive items. Hijacking user clicks
attacker now has free-reign on the Client-side runtime
props during build time
mitigate vulnerabilities in as many ways possible in the case that one way fails
expiration time (in seconds)
applies to all subdomains
not part of spec.
Check HSTS Preload List
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
not allowed ever
only for same domain
only for a specificied URI
X-Frame-Options: SAMEORIGIN
no filter
remove unsafe parts
prevents page for rendering
X-XSS-Protection: 1; mode=block
filters and reports violation
blocks browser from guessing when MIME type is not defined
X-Content-Type-Options: nosniff
<meta http-equiv="Content-Security-Policy" content="default-src 'self'">
async headers() {
return [
{
source: '/:path*',
headers: securityHeaders,
}
]
},
MyDocument.getInitialProps = async (context: DocumentContext) => {
const initialProps = await Document.getInitialProps(context)
const nonce = 'generateNonce()'
return {
...initialProps,
nonce,
}
}
check Knowledge Base for full code snippet