57 lines
1.2 KiB
Nginx Configuration File
57 lines
1.2 KiB
Nginx Configuration File
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
charset utf-8;
|
|
server_tokens off;
|
|
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_min_length 512;
|
|
gzip_types text/css application/javascript image/svg+xml;
|
|
|
|
location = /healthz {
|
|
access_log off;
|
|
default_type text/plain;
|
|
return 200 "ok\n";
|
|
}
|
|
|
|
location ~ /\.ht {
|
|
deny all;
|
|
access_log off;
|
|
log_not_found off;
|
|
}
|
|
|
|
location = / {
|
|
expires -1;
|
|
try_files /index.html =404;
|
|
}
|
|
|
|
location ~* \.html$ {
|
|
expires -1;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location ~* \.(?:css|js)$ {
|
|
expires 1h;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location ^~ /public/images/ {
|
|
expires 30d;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|