Add file uploads 10/...
This commit is contained in:
parent
2b7244ed5e
commit
d8f5715d0f
3 changed files with 26 additions and 5 deletions
|
@ -44,7 +44,7 @@ AddDefaultCharset UTF-8
|
|||
|
||||
# Set Cache-Control header for caching statics
|
||||
<ifModule mod_headers.c>
|
||||
<FilesMatch "\.(css|js|gif|png|jpg|jpeg|webp|woff|woff2)$">
|
||||
<FilesMatch "\.(css|js|gif|png|jpg|jpeg|webp|avif|woff|woff2)$">
|
||||
Header set Cache-Control "public,max-age=31536000,immutable"
|
||||
Header unset ETag
|
||||
</FilesMatch>
|
||||
|
|
|
@ -48,7 +48,7 @@ server {
|
|||
return 404;
|
||||
}
|
||||
|
||||
location ~ \.(css|js|gif|png|jpg|jpeg|webp|woff|woff2)$ {
|
||||
location ~ \.(css|js|gif|png|jpg|jpeg|webp|avif|woff|woff2)$ {
|
||||
try_files $uri =404;
|
||||
|
||||
add_header Cache-Control "public,max-age=31536000,immutable";
|
||||
|
@ -68,7 +68,7 @@ server {
|
|||
return 404;
|
||||
}
|
||||
|
||||
location ~ \.(css|js|gif|png|jpg|jpeg|webp|woff|woff2)$ {
|
||||
location ~ \.(css|js|gif|png|jpg|jpeg|webp|avif|woff|woff2)$ {
|
||||
try_files $uri =404;
|
||||
|
||||
add_header Cache-Control "public,max-age=31536000,immutable";
|
||||
|
@ -88,7 +88,27 @@ server {
|
|||
return 404;
|
||||
}
|
||||
|
||||
location ~ \.(css|js|gif|png|jpg|jpeg|webp|woff|woff2)$ {
|
||||
location ~ \.(css|js|gif|png|jpg|jpeg|webp|avif|woff|woff2)$ {
|
||||
try_files $uri =404;
|
||||
|
||||
add_header Cache-Control "public,max-age=31536000,immutable";
|
||||
etag off;
|
||||
}
|
||||
}
|
||||
|
||||
location /upload/ {
|
||||
location ~ ^(.+)\.v\.[0-9]+\.([^.\\/]++)$ {
|
||||
try_files $1.$2 =404;
|
||||
|
||||
add_header Cache-Control "public,max-age=31536000,immutable";
|
||||
etag off;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ \.(css|js|gif|png|jpg|jpeg|webp|avif|woff|woff2)$ {
|
||||
try_files $uri =404;
|
||||
|
||||
add_header Cache-Control "public,max-age=31536000,immutable";
|
||||
|
|
|
@ -16,6 +16,7 @@ AddDefaultCharset UTF-8
|
|||
RewriteCond %{REQUEST_URI} !^/style/
|
||||
RewriteCond %{REQUEST_URI} !^/img/
|
||||
RewriteCond %{REQUEST_URI} !^/js/
|
||||
RewriteCond %{REQUEST_URI} !^/upload/
|
||||
RewriteCond %{REQUEST_URI} !^/favicon\.ico$
|
||||
RewriteCond %{REQUEST_URI} !^/robots\.txt$
|
||||
RewriteRule . index.php [L]
|
||||
|
@ -36,7 +37,7 @@ AddDefaultCharset UTF-8
|
|||
|
||||
# Set Cache-Control header for caching statics
|
||||
<ifModule mod_headers.c>
|
||||
<FilesMatch "\.(css|js|gif|png|jpg|jpeg|webp|woff|woff2)$">
|
||||
<FilesMatch "\.(css|js|gif|png|jpg|jpeg|webp|avif|woff|woff2)$">
|
||||
Header set Cache-Control "public,max-age=31536000,immutable"
|
||||
Header unset ETag
|
||||
</FilesMatch>
|
||||
|
|
Loading…
Reference in a new issue