forked from LFGBanditLabs/Quipay
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
26 lines (21 loc) · 776 Bytes
/
Copy pathnginx.conf
File metadata and controls
26 lines (21 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Basic gzip for text assets
gzip on;
gzip_types text/plain text/css application/json application/javascript application/xml+rss application/atom+xml image/svg+xml;
# Cache hashed build assets aggressively
location ~* \.(?:js|css|png|jpg|jpeg|gif|svg|ico|webp|woff2?)$ {
try_files $uri =404;
expires 1y;
add_header Cache-Control "public, immutable";
}
# SPA fallback: route everything else to index.html
location / {
try_files $uri $uri/ /index.html;
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; connect-src 'self' https://horizon.stellar.org; report-uri /csp-report";
add_header Cache-Control "no-cache";
}
}