File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed
Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ #TODO: need to include a dockerfile for littleXFE
Original file line number Diff line number Diff line change 1+ events {
2+ worker_connections 1024 ;
3+ }
4+
5+ http {
6+ include /etc/nginx/mime.types ;
7+ default_type application/octet-stream ;
8+
9+ # Enable gzip compression
10+ gzip on;
11+ gzip_vary on;
12+ gzip_min_length 1024 ;
13+ gzip_types
14+ text/plain
15+ text/css
16+ text/xml
17+ text/javascript
18+ application/javascript
19+ application/xml+rss
20+ application/json;
21+
22+ server {
23+ listen 80 ;
24+ server_name localhost;
25+
26+ root /usr/share/nginx/html;
27+ index index .html;
28+
29+ # Handle client-side routing
30+ location / {
31+ try_files $uri $uri / /index .html;
32+ }
33+
34+ # Cache static assets
35+ location ~ * \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
36+ expires 1y ;
37+ add_header Cache-Control "public, immutable" ;
38+ }
39+
40+ # Security headers
41+ add_header X-Frame-Options "SAMEORIGIN" always;
42+ add_header X-XSS-Protection "1; mode=block" always;
43+ add_header X-Content-Type-Options "nosniff" always;
44+ add_header Referrer-Policy "no-referrer-when-downgrade" always;
45+ add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
46+ }
47+ }
You can’t perform that action at this time.
0 commit comments