push to maple-street

This commit is contained in:
Tiel Coder
2026-11-20 04:07:02 +00:00
parent 2cec220a24
commit 5adf1cef1f
345 changed files with 86105 additions and 1079 deletions
+38 -1
View File
@@ -1,7 +1,44 @@
import type { NextConfig } from "next";
/**
* Baseline security headers for every response. The app is served behind an
* external reverse proxy, so TLS/HSTS is the proxy's job; these are the
* application-level defaults that should never depend on the proxy.
*/
const nextConfig: NextConfig = {
/* config options here */
// sharp ships a native binary; let Node load it at runtime instead of trying
// to bundle it into the server build.
serverExternalPackages: ["sharp"],
async headers() {
return [
{
source: "/:path*",
headers: [
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=()",
},
],
},
// API routes skip middleware so uploads are not buffered and truncated
// at 10 MB; keep the clickjacking protection here instead.
{
source: "/api/:path*",
headers: [{ key: "X-Frame-Options", value: "DENY" }],
},
// The embed player is intentionally frameable so a watch link can be
// dropped into a website, LMS, or social platform. Every other page is
// protected by middleware with X-Frame-Options: DENY.
{
source: "/embed/:path*",
headers: [
{ key: "Content-Security-Policy", value: "frame-ancestors *" },
],
},
];
},
};
export default nextConfig;