Bug 1445301 - Update locations file for sclements; r=me default tip
authorGeoff Brown <gbrown@mozilla.com>
Mon, 04 Jun 2018 07:47:03 -0600
changeset 353 4dc7cd6e0bf2f999fff0e30f1a2bb9e397e641f7
parent 352 e6b2ecd3bff55feb0a54cea21df53b5be4ebef1b
push id300
push usergbrown@mozilla.com
push dateMon, 04 Jun 2018 13:47:33 +0000
reviewersme
bugs1445301
Bug 1445301 - Update locations file for sclements; r=me
deployment/locations
--- a/deployment/locations
+++ b/deployment/locations
@@ -1,31 +1,51 @@
 location = / {
     # Stop access log spam from Zeus health check.
     access_log off;
     return 301 /orangefactor/;
 }
 
-location /orangefactor/ {
+location /orangefactor-no-redirect/ {
     # The nginx user is a member of the webtools group, so can access this directory.
     alias /home/webtools/apps/orangefactor/src/orangefactor/html/;
 }
 
-location /orangefactor/api/ {
+location ~(/orangefactor-no-redirect/api/|/orangefactor/api/) {
     fastcgi_ignore_client_abort on;
     fastcgi_read_timeout 300;
     fastcgi_param REQUEST_METHOD $request_method;
     fastcgi_param QUERY_STRING $query_string;
     fastcgi_param CONTENT_TYPE $content_type;
     fastcgi_param CONTENT_LENGTH $content_length;
     fastcgi_param GATEWAY_INTERFACE CGI/1.1;
     fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
     fastcgi_param REMOTE_ADDR $remote_addr;
     fastcgi_param REMOTE_PORT $remote_port;
     fastcgi_param SERVER_ADDR $server_addr;
     fastcgi_param SERVER_PORT $server_port;
     fastcgi_param SERVER_NAME $server_name;
     fastcgi_param SERVER_PROTOCOL $server_protocol;
     fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
-    fastcgi_split_path_info ^(/orangefactor)(.*)$;
+    fastcgi_split_path_info ^(/orangefactor-no-redirect|/orangefactor)(.*)$;
     fastcgi_param PATH_INFO $fastcgi_path_info;
     fastcgi_pass 127.0.0.1:9500;
 }
+
+location /orangefactor/ {
+    if ($args ~* "display=Bug&bugid=[0-9]+&entireHistory=true&tree=(.+)") {
+        rewrite ^.*$ $scheme://treeherder.mozilla.org/intermittent-failures.html#/bugdetails?tree=$arg_tree&bug=$arg_bugid? break;
+    }
+
+    if ($args ~* "(display=Bug&bugid=[0-9]+&startday=(.+)&endday=(.+)&tree=(.+))|(display=Bug&bugid=[0-9]+&endday=(.+)&startday=(.+)&tree=(.+))") {
+        rewrite ^.*$ $scheme://treeherder.mozilla.org/intermittent-failures.html#/bugdetails?startday=$arg_startday&endday=$arg_endday&tree=$arg_tree&bug=$arg_bugid? break;
+    }
+
+    if ($args ~* "display=Bug&bugid=[0-9]+") {
+        rewrite ^.*$ $scheme://treeherder.mozilla.org/intermittent-failures.html#/bugdetails?tree=all&bug=$arg_bugid? break;
+    }
+
+    if ($args ~* "(display=orangeFactor&endday=(.+)&startday=(.+)&tree=(.+))|(display=OrangeFactor&tree=(.+)&startday=(.+)&endday=(.+))") {
+        rewrite ^.*$ $scheme://treeherder.mozilla.org/intermittent-failures.html#/main?startday=$arg_startday&endday=$arg_endday&tree=$arg_tree? break;
+    }
+
+    return 302 $scheme://treeherder.mozilla.org/intermittent-failures.html;
+}