[mb-commits] branch, pino-beta, updated. MBH-298, move $lb_scheme stuff up in the configuration so that it' s used by t...

MusicBrainz Git Server <[email protected]> Fri, 18 Jan 2013 10:47:56 +0000
Newsgroups gmane.comp.audio.musicbrainz.cvs
Message-ID <E1Tw9UK-0000WC-0t@wiley>
The branch, pino-beta has been updated
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=a659084ce180810f81478540184fc2d769313a15 (commit)
      from  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=b62fc51c65c6e8ce127ebd6caa4dcb86f5eb5d7f (commit)

Summary of changes:
 admin/nginx/mbserver-rewrites.conf |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a659084ce180810f81478540184fc2d769313a15
Author: warp <[email protected]>
Date:   Fri Jan 18 11:47:12 2013 +0100

    MBH-298, move $lb_scheme stuff up in the configuration so that it's used by the www.musicbrainz.org redirect as well.

diff --git a/admin/nginx/mbserver-rewrites.conf b/admin/nginx/mbserver-rewrites.conf
index fb9f78f..5ca2f8b 100644
--- a/admin/nginx/mbserver-rewrites.conf
+++ b/admin/nginx/mbserver-rewrites.conf
@@ -1,3 +1,18 @@
+
+# Redirect to http:// or https:// based on the scheme at the load
+# balancer (which the load balancer sends to us as the X-MB-https
+# header).
+
+set $lb_scheme "http";
+if ($http_x_mb_https = on) {
+    set $lb_scheme "https";
+}
+
+set $mb_server "";
+if ($http_host = beta.musicbrainz.org) {
+    set $mb_server "$lb_scheme://beta.musicbrainz.org";
+}
+
 # Redirect www.musicbrainz.org to just musicbrainz.org, but only for GET requests
 set $not_canonical "";
 
@@ -17,16 +32,6 @@ if ($not_canonical = HGWS) {
     rewrite ^/(.*)$ $lb_scheme://musicbrainz.org/$1 permanent;
 }
 
-set $lb_scheme "http";
-if ($http_x_mb_https = on) {
-    set $lb_scheme "https";
-}
-
-set $mb_server "";
-if ($http_host = beta.musicbrainz.org) {
-    set $mb_server "$lb_scheme://beta.musicbrainz.org";
-}
-
 # Pages on other host thingies
 rewrite ^/(~.*)$                         http://users.musicbrainz.org/$1                                           permanent;
 rewrite ^/finances\.html$                http://metabrainz.org/finances                                            permanent;

-----------------------------------------------------------------------


hooks/post-receive
-- 
mb_server