mirror of
https://github.com/fmhy/edit.git
synced 2025-11-28 00:41:20 +11:00
29 lines
No EOL
763 B
Nginx Configuration File
29 lines
No EOL
763 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
add_header X-Frame-Options "DENY";
|
|
add_header X-Content-Type-Options "nosniff";
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
add_header Referrer-Policy "no-referrer-when-downgrade";
|
|
}
|
|
|
|
location ~* \.(?:css|js|jpg|jpeg|gif|png|svg|ico|woff2?)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public";
|
|
}
|
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
access_log /var/log/nginx/access.log;
|
|
}
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
|
|
gzip_min_length 1000;
|
|
gzip_proxied any;
|
|
gzip_vary on; |