security: add Content-Security-Policy header for admin routes

Set a strict CSP on all /admin/* responses: default-src 'self',
script/style 'unsafe-inline' (needed for the inline editor JS and
layout CSS), img-src 'self' data:, frame-ancestors 'none'. Public
API routes are unaffected. Bump ClassLength limit to 420 to
accommodate the new helper.
This commit is contained in:
2026-06-26 20:41:10 +02:00
parent 223405dcb9
commit a2f42c6a12
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ Metrics/MethodLength:
- "lib/volumen/api_routes.rb"
Metrics/ClassLength:
Max: 400
Max: 420
Metrics/ModuleLength:
Exclude: