Skip to content

Commit 07e6eaf

Browse files
andrewkettvzabaznov
authored andcommitted
MAGETWO-59547: Static versioning is not working under nginx
- add nginx rewrite so signed urls work with nginx - (cherry picked from commit b6f19a8)
1 parent 6132d84 commit 07e6eaf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

nginx.conf.sample

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ location /static/ {
8383
if ($MAGE_MODE = "production") {
8484
expires max;
8585
}
86+
87+
# Remove signature of the static files that is used to overcome the browser cache
88+
location ~ ^/static/version {
89+
rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
90+
}
91+
8692
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
8793
add_header Cache-Control "public";
8894
add_header X-Frame-Options "SAMEORIGIN";

0 commit comments

Comments
 (0)