This commit is contained in:
13
nginx.conf
13
nginx.conf
@@ -1,5 +1,6 @@
|
||||
worker_processes auto;
|
||||
pid /tmp/nginx.pid;
|
||||
user tymur999;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
@@ -53,7 +54,7 @@ http {
|
||||
|
||||
# Serve static files
|
||||
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
try_files $uri @index;
|
||||
add_header Cache-Control "public, max-age=15778463";
|
||||
add_header Referrer-Policy "no-referrer" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
@@ -64,12 +65,18 @@ http {
|
||||
}
|
||||
|
||||
location ~ \.(otf|woff2?)$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
try_files $uri @index;
|
||||
expires 7d; # Cache-Control policy borrowed from `.htaccess`
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php$request_uri;
|
||||
try_files $uri @index;
|
||||
}
|
||||
|
||||
location @index {
|
||||
add_header Cache-Control no-cache;
|
||||
expires 0;
|
||||
try_files /index.html =404;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user