Page MenuHomeDevCentral

D1489.diff
No OneTemporary

D1489.diff

diff --git a/roles/saas-mediawiki/nginx/files/includes/mediawiki-root b/roles/saas-mediawiki/nginx/files/includes/mediawiki-root
--- a/roles/saas-mediawiki/nginx/files/includes/mediawiki-root
+++ b/roles/saas-mediawiki/nginx/files/includes/mediawiki-root
@@ -28,14 +28,13 @@
location /images {
alias /var/dataroot/$server_name/images;
+
+ try_files $uri @thumbnail;
}
-location ~ ^/images/thumb/(archive/)?[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ {
- #Note: this doesn't work with InstantCommons.
- if (!-f $request_filename) {
- rewrite ^/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /thumb.php?f=$1&width=$2;
- rewrite ^/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /thumb.php?f=$1&width=$2&archived=1;
- }
+location @thumbnail {
+ rewrite ^/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /thumb.php?f=$1&width=$2;
+ rewrite ^/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /thumb.php?f=$1&width=$2&archived=1;
}
location /images/deleted { deny all; }
diff --git a/roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki b/roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki
--- a/roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki
+++ b/roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki
@@ -24,16 +24,15 @@
try_files $uri $uri/ /w/index.php?$query_string;
}
-location ~ ^/w/images/thumb/(archive/)?[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ {
- #Note: this doesn't work with InstantCommons.
- if (!-f $request_filename) {
- rewrite ^/w/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /w/thumb.php?f=$1&width=$2;
- rewrite ^/w/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /w/thumb.php?f=$1&width=$2&archived=1;
- }
-}
-
location /w/images {
alias /var/dataroot/$server_name/images;
+
+ try_files $uri @thumbnail;
+}
+
+location @thumbnail {
+ rewrite ^/w/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /w/thumb.php?f=$1&width=$2;
+ rewrite ^/w/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /w/thumb.php?f=$1&width=$2&archived=1;
}
location /w/images/deleted { deny all; }

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 12:50 (20 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2262509
Default Alt Text
D1489.diff (2 KB)

Event Timeline