diff --git a/apps/admin/app/not-found.tsx b/apps/admin/app/not-found.tsx new file mode 100644 index 0000000000..fdb3303d3f --- /dev/null +++ b/apps/admin/app/not-found.tsx @@ -0,0 +1,27 @@ +import { Backpack } from 'lucide-react'; +import Link from 'next/link'; + +export default function NotFound() { + return ( +
+
+
+
+ +
+
+

404

+

Page not found

+

+ This admin page doesn't exist. Head back to the dashboard. +

+ + Back to dashboard + +
+
+ ); +} diff --git a/apps/admin/pages/404.tsx b/apps/admin/pages/404.tsx new file mode 100644 index 0000000000..0d27ffdadb --- /dev/null +++ b/apps/admin/pages/404.tsx @@ -0,0 +1,62 @@ +import { Backpack } from 'lucide-react'; + +export default function Custom404() { + return ( +
+
+
+
+ +
+
+

+ 404 +

+

+ Page not found +

+

+ This admin page doesn't exist. Head back to the dashboard. +

+ + Back to dashboard + +
+
+ ); +} diff --git a/apps/admin/pages/500.tsx b/apps/admin/pages/500.tsx new file mode 100644 index 0000000000..4380ed4d61 --- /dev/null +++ b/apps/admin/pages/500.tsx @@ -0,0 +1,80 @@ +import { AlertTriangle } from 'lucide-react'; + +export default function Custom500() { + return ( +
+
+
+
+ +
+
+

+ 500 +

+

+ Something went wrong +

+

+ An unexpected error occurred. Try again or contact support if the problem persists. +

+
+ + Back to dashboard + + + Contact support + +
+
+
+ ); +} diff --git a/apps/admin/public/_headers b/apps/admin/public/_headers new file mode 100644 index 0000000000..2d74e7653b --- /dev/null +++ b/apps/admin/public/_headers @@ -0,0 +1,5 @@ +/* + X-Frame-Options: DENY + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin + Permissions-Policy: camera=(), microphone=(), geolocation=() diff --git a/apps/admin/wrangler.jsonc b/apps/admin/wrangler.jsonc new file mode 100644 index 0000000000..b8b489953a --- /dev/null +++ b/apps/admin/wrangler.jsonc @@ -0,0 +1,9 @@ +{ + "$schema": "https://developers.cloudflare.com/schemas/wrangler.json", + "name": "packrat-admin", + "compatibility_date": "2024-09-23", + "assets": { + "directory": "./out", + "not_found_handling": "404-page" + } +} diff --git a/apps/guides/package.json b/apps/guides/package.json index 6912c90117..8d451a366f 100644 --- a/apps/guides/package.json +++ b/apps/guides/package.json @@ -5,7 +5,7 @@ "scripts": { "build": "bun run build-content && next build", "build-content": "bun run scripts/build-content.ts", - "clean": "bunx rimraf .next node_modules out .vercel", + "clean": "bunx rimraf .next node_modules out", "demo-enhancement": "bun run scripts/demo-enhancement.ts", "dev": "next dev", "enhance-content": "bun run scripts/enhance-content.ts", diff --git a/apps/guides/public/_headers b/apps/guides/public/_headers new file mode 100644 index 0000000000..2d74e7653b --- /dev/null +++ b/apps/guides/public/_headers @@ -0,0 +1,5 @@ +/* + X-Frame-Options: DENY + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin + Permissions-Policy: camera=(), microphone=(), geolocation=() diff --git a/apps/guides/wrangler.jsonc b/apps/guides/wrangler.jsonc new file mode 100644 index 0000000000..503526d1ef --- /dev/null +++ b/apps/guides/wrangler.jsonc @@ -0,0 +1,9 @@ +{ + "$schema": "https://developers.cloudflare.com/schemas/wrangler.json", + "name": "packrat-guides", + "compatibility_date": "2024-09-23", + "assets": { + "directory": "./out", + "not_found_handling": "404-page" + } +} diff --git a/apps/landing/package.json b/apps/landing/package.json index 6da61baf98..53d080b364 100644 --- a/apps/landing/package.json +++ b/apps/landing/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "build": "next build", - "clean": "bunx rimraf node_modules .next out .vercel", + "clean": "bunx rimraf node_modules .next out", "dev": "next dev", "lint": "next lint", "start": "next start" diff --git a/apps/landing/public/_headers b/apps/landing/public/_headers new file mode 100644 index 0000000000..2d74e7653b --- /dev/null +++ b/apps/landing/public/_headers @@ -0,0 +1,5 @@ +/* + X-Frame-Options: DENY + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin + Permissions-Policy: camera=(), microphone=(), geolocation=() diff --git a/apps/landing/vercel.json b/apps/landing/vercel.json deleted file mode 100644 index 3226e8d360..0000000000 --- a/apps/landing/vercel.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "headers": [ - { - "source": "/(.*)", - "headers": [ - { "key": "X-Frame-Options", "value": "DENY" }, - { "key": "X-Content-Type-Options", "value": "nosniff" }, - { "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" }, - { "key": "Permissions-Policy", "value": "camera=(), microphone=(), geolocation=()" } - ] - } - ] -} diff --git a/apps/landing/wrangler.jsonc b/apps/landing/wrangler.jsonc new file mode 100644 index 0000000000..fd5c5f2502 --- /dev/null +++ b/apps/landing/wrangler.jsonc @@ -0,0 +1,9 @@ +{ + "$schema": "https://developers.cloudflare.com/schemas/wrangler.json", + "name": "packrat-landing", + "compatibility_date": "2024-09-23", + "assets": { + "directory": "./out", + "not_found_handling": "404-page" + } +}