bvdputte / kirby-fingerprint

Cache-busting utility to fingerprint assets (JS/CSS) in Kirby CMS
MIT License
16 stars 3 forks source link

Readme: Nginx instructions out of date #9

Closed sebastiangreger closed 4 years ago

sebastiangreger commented 4 years ago

While setting up Kirby on an Nginx server, we discovered that this doesn't work:

location ~ (.+)\.(?:\d+)\.(js|css)$ {
    try_files $uri $1.$2;
}

That regex does not catch the alphanumeric fingerprint strings. Following the Apache example, Nginx setup works when using (.+)\.(?:[0-9,a-z]+)\.(js|css)$ or (.+)\.(?:\w+)\.(js|css)$.