feat: make cloonar website use the web stack module
This commit is contained in:
@@ -27,8 +27,12 @@ in {
|
||||
|
||||
# Serve AVIF if supported and available
|
||||
if ($img_format = "AV") {
|
||||
add_header Vary Accept;
|
||||
rewrite ^ /avif/$request_uri.avif break;
|
||||
add_header Vary Accept;
|
||||
expires 365d;
|
||||
add_header Pragma "public";
|
||||
add_header Cache-Control "public";
|
||||
rewrite ^ /avif/$request_uri.avif break;
|
||||
|
||||
}
|
||||
|
||||
# Reset and check for WebP support (fallback)
|
||||
@@ -45,21 +49,17 @@ in {
|
||||
# Serve WebP if supported and available
|
||||
if ($img_format = "WP") {
|
||||
add_header Vary Accept;
|
||||
expires 365d;
|
||||
add_header Pragma "public";
|
||||
add_header Cache-Control "public";
|
||||
rewrite ^ /webp/$request_uri.webp break;
|
||||
}
|
||||
|
||||
# If neither AVIF nor WebP matched, serve original format
|
||||
add_header Vary Accept;
|
||||
'';
|
||||
|
||||
locations."^~ /vcards/".extraConfig = ''
|
||||
location ~ /\.env {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Determine if the requested file exists
|
||||
try_files $uri $uri/ /vcards/index.php$is_args$args;
|
||||
expires 365d;
|
||||
add_header Pragma "public";
|
||||
add_header Cache-Control "public";
|
||||
'';
|
||||
|
||||
locations."~* \.(js|jpg|gif|png|webp|avif|css|woff2)$".extraConfig = ''
|
||||
|
||||
Reference in New Issue
Block a user