mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
fix: admin CSP allow inline scripts
script-src 'self' 'unsafe-inline' added to admin Content-Security-Policy. default-src 'self' was blocking OverType editor init block and the dev live-reload poller. Admin section is auth-gated so unsafe-inline is acceptable.
This commit is contained in:
@@ -123,8 +123,10 @@ server {
|
||||
# Rate limiting for admin
|
||||
limit_req zone=admin burst=20 nodelay;
|
||||
|
||||
# Content-Security-Policy - Tighter policy for admin
|
||||
add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; object-src 'none'; frame-ancestors 'none';" always;
|
||||
# Content-Security-Policy - Admin policy
|
||||
# script-src needs 'unsafe-inline' for the OverType editor init block
|
||||
# and the live-reload poller (dev only). Admin is already auth-gated.
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; object-src 'none'; frame-ancestors 'none';" always;
|
||||
|
||||
# Disable directory listing
|
||||
autoindex off;
|
||||
|
||||
Reference in New Issue
Block a user