summaryrefslogtreecommitdiff
path: root/astro.config.mjs
diff options
context:
space:
mode:
authorGravatar Anshul Gupta <ansg191@anshulg.com> 2025-06-07 09:50:01 -0700
committerGravatar Anshul Gupta <ansg191@anshulg.com> 2025-06-07 09:53:44 -0700
commit2af7c5b1dae0cfc3111363ba39922fd76718fc77 (patch)
treeb2b3b78b471caff9ae177028823615f35750a879 /astro.config.mjs
parent431bed6b462d3b7b0477196e32b55356a4e2741b (diff)
downloadanshulg-com-2af7c5b1dae0cfc3111363ba39922fd76718fc77.tar.gz
anshulg-com-2af7c5b1dae0cfc3111363ba39922fd76718fc77.tar.zst
anshulg-com-2af7c5b1dae0cfc3111363ba39922fd76718fc77.zip
Add more stricter CSP directives
Diffstat (limited to '')
-rw-r--r--astro.config.mjs10
1 files changed, 9 insertions, 1 deletions
diff --git a/astro.config.mjs b/astro.config.mjs
index dcb4119..f5111a5 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -10,7 +10,15 @@ import sitemap from "@astrojs/sitemap";
* @type {false|{directives: import("node_modules/astro/dist/core/csp/config").CspDirective[]}}
*/
const csp = process.env.NODE_ENV === "production" && {
- directives: ["object-src 'none'"],
+ directives: [
+ "default-src 'none'",
+ "base-uri 'none'",
+ "form-action 'none'",
+ "object-src 'none'",
+ "img-src 'self'",
+ "font-src 'self'",
+ "connect-src 'self'",
+ ],
};
// https://astro.build/config