fix: use expanded regex in nginx location for hashed assets

Replace {8} quantifier with 8 repeated character classes for
compatibility with nginx regex parsing.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Chever John 2026-06-30 02:52:32 +08:00
parent 68da2c2c20
commit a3e9361cab
No known key found for this signature in database
GPG Key ID: 2894D52ED1211DF0

View File

@ -38,7 +38,7 @@ server {
} }
# Hashed static assets long-term cache is safe # Hashed static assets long-term cache is safe
location ~* \.[0-9a-f]{8}\.(js|css)$ { location ~* \.[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]\.(js|css)$ {
expires 30d; expires 30d;
add_header Cache-Control "public, immutable"; add_header Cache-Control "public, immutable";
} }