Skip to content

Commit fe5430c

Browse files
committed
nginx.conf.template / api proxy removal changes
Changes provided by Shaun Bathgate along with commit 76b373a
1 parent 03c193e commit fe5430c

File tree

1 file changed

+22
-26
lines changed

1 file changed

+22
-26
lines changed

nginx.conf.template

+22-26
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
1-
# Main server block for the application
21
server {
3-
listen 8080;
4-
server_name _;
5-
root /usr/share/nginx/html;
2+
listen 8080;
3+
server_name _;
64

7-
# Health check endpoint
8-
location /healthz {
9-
access_log off;
10-
return 200 "healthy\n";
11-
}
12-
# Static assets with improved caching
13-
location ~ ^/assets/ {
14-
expires 1y;
15-
add_header Cache-Control "public, max-age=31536000, immutable";
16-
try_files $uri =404;
17-
18-
# Security headers for static content
19-
add_header X-Frame-Options "DENY" always;
20-
add_header X-Content-Type-Options "nosniff" always;
21-
add_header X-XSS-Protection "1; mode=block" always;
22-
}
5+
location /healthz {
6+
access_log off;
7+
return 200 "healthy\n";
8+
}
239

24-
# Deny access to hidden files
25-
location ~ /\. {
26-
deny all;
27-
return 404;
28-
}
29-
}
10+
location ~ ^/assets/ {
11+
alias /usr/share/nginx/html/assets/;
12+
expires 1y;
13+
add_header Cache-Control "public, max-age=31536000, immutable";
14+
add_header X-Debug-Path $request_filename always;
15+
try_files $uri =404;
16+
17+
add_header X-Frame-Options "DENY" always;
18+
add_header X-Content-Type-Options "nosniff" always;
19+
add_header X-XSS-Protection "1; mode=block" always;
20+
}
21+
22+
location / {
23+
return 404;
24+
}
25+
}

0 commit comments

Comments
 (0)