Secure header
This commit is contained in:
parent
4b48a6efd5
commit
efc84d5d86
2 changed files with 32 additions and 1 deletions
|
@ -5,6 +5,36 @@ const nextConfig = {
|
||||||
experimental: {
|
experimental: {
|
||||||
appDir: true,
|
appDir: true,
|
||||||
scrollRestoration: true
|
scrollRestoration: true
|
||||||
|
},
|
||||||
|
headers: async () => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
source: '/(.*)',
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
key: 'X-Frame-Options',
|
||||||
|
value: 'DENY'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'Content-Security-Policy',
|
||||||
|
value:
|
||||||
|
"default-src 'self'; script-src 'self'; font-src 'self' 'https://fonts.googleapis.com'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'X-Content-Type-Options',
|
||||||
|
value: 'nosniff'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'Permissions-Policy',
|
||||||
|
value: 'camera=(); battery=(); geolocation=(); microphone=()'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'Referrer-Policy',
|
||||||
|
value: 'origin-when-cross-origin'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,8 @@ export default function Puzzle({ token, id }: { token: string; id: number }) {
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="items-center gap-x-2">
|
<div className="items-center gap-x-2">
|
||||||
<p>
|
<p>
|
||||||
Tentative{puzzle.tries && puzzle.tries > 1 ? "s":""} : <span className="text-brand-accent">{puzzle.tries}</span>
|
Tentative{puzzle.tries && puzzle.tries > 1 ? 's' : ''} :{' '}
|
||||||
|
<span className="text-brand-accent">{puzzle.tries}</span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Score : <span className="text-brand-accent">{puzzle.score}</span>
|
Score : <span className="text-brand-accent">{puzzle.score}</span>
|
||||||
|
|
Loading…
Add table
Reference in a new issue