Page MenuHomeDevCentral

D1489.id3813.diff
No OneTemporary

D1489.id3813.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
Fri, Nov 29, 04:10 (17 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2270696
Default Alt Text
D1489.id3813.diff (2 KB)

Event Timeline