Skip to content

Commit 1cbbc4d

Browse files
committed
rudimentary hardening
1 parent 3fcf3d9 commit 1cbbc4d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

nginx/default.conf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ server {
22
listen 8080;
33
server_name localhost;
44

5-
#access_log /var/log/nginx/host.access.log main;
6-
75
location / {
86
root /usr/share/nginx/html;
97
try_files $uri $uri/ /index.html =404;
@@ -17,4 +15,8 @@ server {
1715
location = /50x.html {
1816
root /usr/share/nginx/html;
1917
}
20-
}
18+
autoindex off;
19+
server_tokens off;
20+
add_header Content-Security-Policy "default-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com https://fonts.gstatic.com;";
21+
add_header X-Content-Type-Options nosniff;
22+
}

0 commit comments

Comments
 (0)