fixed websocket forwarding
[sdnc/oam.git] / installation / sdnc-web / src / main / resources / https_site.conf
index 335aef4..5e61fec 100644 (file)
@@ -75,35 +75,29 @@ server {
         try_files /help/$args.json $uri;
     }
     location ~ ^/transportpce  {
-        try_files $uri $uri/ @backend-transportpce;
+        if ($request_uri ~* "/transportpce/(.*)") { 
+            proxy_pass TRPCEURL/$1;
+        }
     }
     location ~ ^/topology  {
-        try_files $uri $uri/ @backend-topology;
+        proxy_pass TOPOURL;
     }
-    location ~ ^/tiles  {
-        try_files $uri $uri/ @backend-tiles;
+    location ~ ^/tiles/  {
+        resolver DNS_RESOLVER;
+        if ($request_uri ~* "/tiles/(.*)") { 
+            proxy_pass TILEURL/$1;
+        }
     }
     location /  {
         try_files $uri $uri/ @backend;
     }
-    location ^/websocket$ {
+    location /websocket {
         proxy_pass SDNRPROTOCOL://SDNRHOST:SDNRPORT/websocket;
         proxy_http_version 1.1;
         proxy_set_header Upgrade $http_upgrade;
-            proxy_set_header Connection "upgrade";
+        proxy_set_header Connection "upgrade";
     }
     location @backend {
         proxy_pass SDNRPROTOCOL://SDNRHOST:SDNRPORT;
     }
-    location @backend-transportpce {
-        proxy_pass TRPCEURL;
-    }
-    location @backend-topology {
-        proxy_pass TOPOURL;
-    }
-    location @backend-tiles {
-        proxy_pass TILEURL;
-    }
-
 }
-