diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 492eba6..e41dfa0 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -50,6 +50,12 @@ http { root /usr/share/nginx/html; include /etc/nginx/mime.types; + # Security headers + add_header X-Frame-Options "DENY" always; + add_header X-Content-Type-Options "nosniff" always; + add_header Referrer-Policy "strict-origin-when-cross-origin" always; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self' wss: ws:; object-src 'none'; base-uri 'self'; frame-ancestors 'none';" always; + # If a react app URI is directly accessed we will get 404 # since there will be no file representing that path. # Below config will load index.html file in such case and