Skip to content

Commit 1fcbeef

Browse files
ENGCOM-4193: Update static block in nginx.conf.sample #21045
- Merge Pull Request #21045 from jaideepghosh/magento2:2.3-develop - Merged commits: 1. 8ec9a3a 2. e560301
2 parents d3203b0 + e560301 commit 1fcbeef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nginx.conf.sample

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ location /static/ {
9999

100100
# Remove signature of the static files that is used to overcome the browser cache
101101
location ~ ^/static/version {
102-
rewrite ^/static/(version[^/]+/)?(.*)$ /static/$2 last;
102+
rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
103103
}
104104

105105
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2|json)$ {
@@ -108,7 +108,7 @@ location /static/ {
108108
expires +1y;
109109

110110
if (!-f $request_filename) {
111-
rewrite ^/static/?(.*)$ /static.php?resource=$1 last;
111+
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
112112
}
113113
}
114114
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
@@ -117,11 +117,11 @@ location /static/ {
117117
expires off;
118118

119119
if (!-f $request_filename) {
120-
rewrite ^/static/?(.*)$ /static.php?resource=$1 last;
120+
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
121121
}
122122
}
123123
if (!-f $request_filename) {
124-
rewrite ^/static/?(.*)$ /static.php?resource=$1 last;
124+
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
125125
}
126126
add_header X-Frame-Options "SAMEORIGIN";
127127
}

0 commit comments

Comments
 (0)