]> git.ardis.lu - git.ardis.lu/commitdiff
Set basic security hardening
authorArdis Lu <ardisglu@gmail.com>
Sun, 14 Sep 2025 23:43:36 +0000 (16:43 -0700)
committerArdis Lu <ardisglu@gmail.com>
Sun, 14 Sep 2025 23:43:36 +0000 (16:43 -0700)
Serving a more locked-down CSP is blocked by gitweb inlining JS, will need some workaround to insert SRI checks.

etc/caddy/Caddyfile

index 35d763d186f1c396092f890a884afe3806bd34e5..e659f8628701e09ebbc8289e0fb9edde4b81b178 100644 (file)
@@ -1,4 +1,9 @@
 git.ardis.lu {
+  header {
+    Content-Security-Policy "object-src 'none'; base-uri 'self'; frame-ancestors 'none';"
+    X-Content-Type-Options nosniff
+  }
+
   root /usr/share/gitweb
   encode
   file_server
This page took 0.043523 seconds and 4 git commands to generate.