From 690259130c77b92e894ddd1d26be53623ff5379a Mon Sep 17 00:00:00 2001 From: Jacob Mathison Date: Thu, 9 Apr 2026 09:19:11 -0500 Subject: [PATCH] feat: 404 page, security headers, BLB favicon + apple-touch-icon from logo --- next.config.ts | 28 ++++++++++++++++++++++- pages/404.tsx | 43 ++++++++++++++++++++++++++++++++++++ pages/_document.tsx | 4 +++- public/apple-touch-icon.png | Bin 0 -> 300506 bytes public/favicon.ico | Bin 25931 -> 692 bytes 5 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 pages/404.tsx create mode 100644 public/apple-touch-icon.png diff --git a/next.config.ts b/next.config.ts index 3915163..8e515e3 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,8 +1,34 @@ import type { NextConfig } from "next"; +const securityHeaders = [ + { key: "X-DNS-Prefetch-Control", value: "on" }, + { key: "X-Frame-Options", value: "SAMEORIGIN" }, + { key: "X-Content-Type-Options", value: "nosniff" }, + { key: "Referrer-Policy", value: "strict-origin-when-cross-origin" }, + { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()" }, + { + key: "Content-Security-Policy", + value: [ + "default-src 'self'", + "script-src 'self' 'unsafe-inline' https://www.googletagmanager.com https://www.google-analytics.com", + "style-src 'self' 'unsafe-inline'", + "img-src 'self' data: https:", + "connect-src 'self' https://www.google-analytics.com https://analytics.google.com", + "frame-ancestors 'none'", + ].join("; "), + }, +]; + const nextConfig: NextConfig = { - /* config options here */ reactStrictMode: true, + async headers() { + return [ + { + source: "/(.*)", + headers: securityHeaders, + }, + ]; + }, }; export default nextConfig; diff --git a/pages/404.tsx b/pages/404.tsx new file mode 100644 index 0000000..d9edb7c --- /dev/null +++ b/pages/404.tsx @@ -0,0 +1,43 @@ +import Head from "next/head"; +import Link from "next/link"; +import styles from "@/styles/Home.module.css"; + +export default function NotFound() { + return ( + <> + + 404 — Page Not Found | Bone Lord Bob + + +
+ + +
+
+ 404 +

+ Lost in the Bone Kingdom +

+

+ This page doesn't exist. Even the dead couldn't find it. +

+
+ + Return to the World + +
+
+
+ +
+ Bone Lord Bob + © {new Date().getFullYear()} Mathison Projects Inc. +
+
+ + ); +} diff --git a/pages/_document.tsx b/pages/_document.tsx index fb3c4e4..3b31a06 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -17,7 +17,9 @@ export default function Document() { - + + + {/* Google Analytics GA4 — G-6EJVCK4931 */}