diff --git a/modules/nixos/server/nginx.nix b/modules/nixos/server/nginx.nix index 2cf0163..d5394db 100644 --- a/modules/nixos/server/nginx.nix +++ b/modules/nixos/server/nginx.nix @@ -53,7 +53,7 @@ in with lib; { # add_header Strict-Transport-Security $hsts_header; # Enable CSP for your services. - #add_header Content-Security-Policy "script-src 'self'; object-src 'none'; base-uri 'none';" always; + add_header Content-Security-Policy "script-src 'self'; object-src 'none'; base-uri 'none';" always; # Minimize information leaked to other domains add_header 'Referrer-Policy' 'origin-when-cross-origin'; @@ -69,6 +69,9 @@ in with lib; { # required when the server wants to use HTTP Authentication proxy_pass_header Authorization; + + # This is necessary to pass the correct IP to be hashed + real_ip_header X-Real-IP; ''; virtualHosts = let