commit
Allow iconsax's icon colour style in the CSP
iconsax sets style="color:currentColor" on every icon, which style-src 'self' blocked, logging a CSP error per icon. Allowed by exact hash only.
diff --git a/src/main.ts b/src/main.ts
index ee443f0..9f7317a 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -59,7 +59,7 @@ app.use("*", async (c, next) => {
const h = c.res.headers;
h.set(
"Content-Security-Policy",
- "default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' https: data:; font-src 'self' https://raw.doughmination.gay; connect-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'",
+ "default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-hashes' 'sha256-muhGX4Mn7np2XQi6DH6Iz+0SHdws6/BLgVigE46O3Xc='; img-src 'self' https: data:; font-src 'self' https://raw.doughmination.gay; connect-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'",
);
h.set("X-Frame-Options", "DENY");
h.set("X-Content-Type-Options", "nosniff");