Commit fe5430c 1 parent 03c193e commit fe5430c Copy full SHA for fe5430c
File tree 1 file changed +22
-26
lines changed
1 file changed +22
-26
lines changed Original file line number Diff line number Diff line change 1
- # Main server block for the application
2
1
server {
3
- listen 8080;
4
- server_name _;
5
- root /usr/share/nginx/html;
2
+ listen 8080;
3
+ server_name _;
6
4
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
+ }
23
9
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
+ }
You can’t perform that action at this time.
0 commit comments