SHA256
62 lines
1.3 KiB
Nginx Configuration File
62 lines
1.3 KiB
Nginx Configuration File
|
|
server {
|
|
listen 8080;
|
|
listen [::]:8080;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
server_tokens off;
|
|
autoindex off;
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_comp_level 5;
|
|
gzip_min_length 1024;
|
|
gzip_types text/plain;
|
|
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
|
|
location = / {
|
|
add_header Cache-Control "no-cache";
|
|
try_files /index.html =404;
|
|
}
|
|
|
|
location = /r {
|
|
add_header Cache-Control "no-cache";
|
|
try_files /r/index.html =404;
|
|
}
|
|
|
|
location = /public.asc {
|
|
default_type application/pgp-keys;
|
|
expires 1h;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location ^~ /.well-known/openpgpkey/ {
|
|
types {}
|
|
default_type application/octet-stream;
|
|
|
|
add_header Access-Control-Allow-Origin "*" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
|
|
expires 1h;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location ~* ^/assets/.*\.(woff2|jpg|webp)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
|
|
access_log off;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
return 404;
|
|
}
|
|
}
|