Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,46 @@ const nextConfig = {
},
].filter(Boolean),
},
async headers() {
return [
{
source: "/:path*",
headers: [
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "Referrer-Policy",
value: "strict-origin-when-cross-origin",
},
{
key: "X-DNS-Prefetch-Control",
value: "off",
},
{
key: "Strict-Transport-Security",
Comment thread
richiemcilroy marked this conversation as resolved.
value: "max-age=63072000; includeSubDomains",
Comment thread
richiemcilroy marked this conversation as resolved.
},
Comment thread
richiemcilroy marked this conversation as resolved.
Comment thread
richiemcilroy marked this conversation as resolved.
Comment thread
richiemcilroy marked this conversation as resolved.
],
},
// Clickjacking protection for the authenticated/interactive app
// surfaces (including subpaths). Shared videos (/s, /embed) and public
// collections (/c) are intentionally embeddable, so X-Frame-Options is
// NOT applied to them.
...[
"/dashboard/:path*",
"/onboarding/:path*",
"/admin/:path*",
"/verify-otp/:path*",
"/login/:path*",
"/signup/:path*",
].map((source) => ({
source,
headers: [{ key: "X-Frame-Options", value: "SAMEORIGIN" }],
})),
];
Comment thread
richiemcilroy marked this conversation as resolved.
},
async rewrites() {
return [
{
Expand Down
Loading