SHA256
nginx + docker + compose
This commit is contained in:
+56
@@ -0,0 +1,56 @@
|
||||
|
||||
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 text/html;
|
||||
|
||||
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 = /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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user