Skip to content

Commit 58875a8

Browse files
fix: add security headers to nginx config (VAPT findings #3, #4)
1 parent 02fb49b commit 58875a8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

frontend/nginx.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ http {
5050
root /usr/share/nginx/html;
5151
include /etc/nginx/mime.types;
5252

53+
# Security headers
54+
add_header X-Frame-Options "DENY" always;
55+
add_header X-Content-Type-Options "nosniff" always;
56+
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
57+
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' https://*.visitran.com wss://*.visitran.com; object-src 'none'; base-uri 'self'; frame-ancestors 'none';" always;
58+
5359
# If a react app URI is directly accessed we will get 404
5460
# since there will be no file representing that path.
5561
# Below config will load index.html file in such case and

0 commit comments

Comments
 (0)