gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-deployment] branch master updated: proper switching


From: gnunet
Subject: [GNUnet-SVN] [taler-deployment] branch master updated: proper switching for landing
Date: Thu, 09 Mar 2017 22:31:06 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new b14aa69  proper switching for landing
b14aa69 is described below

commit b14aa693f20819f83575757fc9e03165959d75fd
Author: Florian Dold <address@hidden>
AuthorDate: Thu Mar 9 22:31:03 2017 +0100

    proper switching for landing
---
 etc/nginx/sites-enabled/test.site | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/etc/nginx/sites-enabled/test.site 
b/etc/nginx/sites-enabled/test.site
index a06e57b..1409f3f 100644
--- a/etc/nginx/sites-enabled/test.site
+++ b/etc/nginx/sites-enabled/test.site
@@ -18,20 +18,28 @@ server {
   rewrite /javascript /javascript.html break;
   include conf.d/test.redirects;
   include conf.d/talerssl;
-  if ($http_x_taler_deployment_color ~ "green|blue") {
-    rewrite .* @$http_x_taler_deployment_color last;
-  }
   location @green {
     add_header X-Taler-Deployment-Color green;
     uwsgi_pass unix:/home/test-green/sockets/landing.uwsgi;
     include /etc/nginx/uwsgi_params;
   }
   location @blue {
-    add_header X-Taler-Deployment-Color green;
+    add_header X-Taler-Deployment-Color blue;
     uwsgi_pass unix:/home/test-blue/sockets/landing.uwsgi;
     include /etc/nginx/uwsgi_params;
   }
   location / {
+    # Redirection technique explainted at
+    # https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/
+    error_page 418 = @blue;
+    error_page 419 = @green;
+    recursive_error_pages on;
+    if ($http_x_taler_deployment_color ~ "blue") {
+      return 418;
+    }
+    if ($http_x_taler_deployment_color ~ "green") {
+      return 419;
+    }
     uwsgi_pass unix:/home/test/sockets/landing.uwsgi;
     include /etc/nginx/uwsgi_params;
   }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]