gethumanai-landing/nginx.conf

30 lines
731 B
Nginx Configuration File
Raw Permalink Normal View History

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
charset utf-8;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
# Gzip
gzip on;
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
gzip_min_length 1024;
location / {
try_files $uri $uri/ $uri.html =404;
}
location ~* \.(js|css|woff2?|ttf|svg|ico|png|jpg|webp)$ {
expires 1y;
add_header Cache-Control "public, immutable";
access_log off;
}
error_page 404 /404.html;
}