Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions config/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ http {
set $kibana kibana:5601;
set $mosquitto mosquitto:9001;

# Defensive clickjacking headers, applied at the server level so they
# propagate to all HTML responses (frontend SPAs, login pages, etc.).
# `frame-ancestors 'self'` (CSP Level 2) is the standards-track form;
# `X-Frame-Options SAMEORIGIN` covers older browsers that don't honour CSP.
# Locations that declare their own `add_header` directives do not
# inherit these — API responses are JSON and not framable, so the
# protection is targeted at the HTML surface that matters.
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Content-Security-Policy "frame-ancestors 'self'" always;

location ~ "^/\.(?!well-known/)" {
deny all;
}
Expand Down
Loading