Nginx location versioning decimal -


i have nginx location block setup allows me provide versioning static files can allow user cache files , when update website, version takes place , still pulls date file.

my question is, how can modify location block allow /cdn/v1.04/js allows me /cdn/v1/js?

location ~ /cdn/v[0-9]+/(js|css|img|fonts)/(.*) {     access_log off;     expires max;     try_files $uri $uri/ /$1/$2; } 

you missed dot in regex.

location ~ /cdn/v[0-9.]+/(js|css|img|fonts)/(.*) {     access_log off;     expires max;     try_files $uri $uri/ /$1/$2 =404; } 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -