From e8a16def343236047ece8805f61fd9d6858440d7 Mon Sep 17 00:00:00 2001 From: Emil Gulamov <125820963+mearashadowfax@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:42:07 +0400 Subject: [PATCH] Refactor file structure and enhance security headers Removed blog and product pages and moved their contents to new blog and product directories, respectively. Added a new 404 error page for invalid routes. Updated server configurations in 'vercel.json' to leverage additional security by adding 'cdnjs.cloudflare.com' to Content-Security-Policy headers. --- src/env.d.ts | 1 + src/pages/404.astro | 35 +++++++++++++++++++ src/pages/{blog.astro => blog/index.astro} | 2 +- src/pages/prod.astro | 14 ++++---- .../{products.astro => products/index.astro} | 12 +++---- vercel.json | 2 +- 6 files changed, 51 insertions(+), 15 deletions(-) create mode 100644 src/pages/404.astro rename src/pages/{blog.astro => blog/index.astro} (61%) rename src/pages/{products.astro => products/index.astro} (84%) diff --git a/src/env.d.ts b/src/env.d.ts index f964fe0..acef35f 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1 +1,2 @@ +/// /// diff --git a/src/pages/404.astro b/src/pages/404.astro new file mode 100644 index 0000000..cf34bb5 --- /dev/null +++ b/src/pages/404.astro @@ -0,0 +1,35 @@ +--- +// Import section components +import MainLayout from "../layouts/MainLayout.astro"; +import PrimaryCTA from "../components/ui/buttons/PrimaryCTA.astro"; +--- + + +
+
+
+

+ 404 +

+

+ Oops, this isn't the tool you were looking for! +

+ +

+ Don't let this hiccup slow you down. Let's get you back to building + your masterpiece. +

+ +
+
+
+
diff --git a/src/pages/blog.astro b/src/pages/blog/index.astro similarity index 61% rename from src/pages/blog.astro rename to src/pages/blog/index.astro index 1da9ae1..ba009be 100644 --- a/src/pages/blog.astro +++ b/src/pages/blog/index.astro @@ -1,6 +1,6 @@ --- // Import section components -import MainLayout from "../layouts/MainLayout.astro"; +import MainLayout from "../../layouts/MainLayout.astro"; --- diff --git a/src/pages/prod.astro b/src/pages/prod.astro index 9c0dabf..89de13e 100644 --- a/src/pages/prod.astro +++ b/src/pages/prod.astro @@ -28,7 +28,7 @@ import { Image } from "astro:assets"; {productData.main.content}

-
+