renable proxy to gui3 (for Paul's remote workflow)
diff --git a/web/ons-demo/js/model.js b/web/ons-demo/js/model.js
index 6577fea..1f90362 100644
--- a/web/ons-demo/js/model.js
+++ b/web/ons-demo/js/model.js
@@ -70,12 +70,12 @@
 }
 
 var proxyURLs = {
-	links: '/proxy/wm/core/topology/links/json',
-	switches: '/proxy/wm/core/topology/switches/all/json',
-	flows: '/proxy/wm/flow/getall/json',
-	activeControllers: '/proxy/wm/registry/controllers/json',
+	links: '/wm/core/topology/links/json?proxy',
+	switches: '/wm/core/topology/switches/all/json?proxy',
+	flows: '/wm/flow/getall/json?proxy',
+	activeControllers: '/wm/registry/controllers/json?proxy',
 	controllers: 'data/controllers.json',
-	mapping: '/proxy/wm/registry/switches/json',
+	mapping: '/wm/registry/switches/json?proxy',
 	configuration: 'data/configuration.json'
 }
 
diff --git a/web/restapi2.py b/web/restapi2.py
index ca6ad5c..c9952ac 100755
--- a/web/restapi2.py
+++ b/web/restapi2.py
@@ -53,15 +53,19 @@
 
   return response
 
-## PROXY API (allows development where the webui is served from someplace other than the ONOS_HOST)##
-#ONOS_HOST="http://gui3.onlab.us:8080"
-ONOS_HOST="http://localhost:8080" ;# for Amazon EC2
+## PROXY API (allows development where the webui is served from someplace other than the controller)##
+ONOS_GUI3_HOST="http://gui3.onlab.us:8080"
+ONOS_LOCAL_HOST="http://localhost:8080" ;# for Amazon EC2
 
 @app.route("/wm/core/topology/switches/all/json")
-@app.route("/proxy/wm/core/topology/switches/all/json")
 def switches():
+  if request.args.get('proxy') == None:
+    host = ONOS_LOCAL_HOST
+  else:
+    host = ONOS_GUI3_HOST
+
   try:
-    command = "curl -s %s/wm/core/topology/switches/all/json" % (ONOS_HOST)
+    command = "curl -s %s/wm/core/topology/switches/all/json" % (host)
     print command
     result = os.popen(command).read()
   except:
@@ -72,10 +76,14 @@
   return resp
 
 @app.route("/wm/core/topology/links/json")
-@app.route("/proxy/wm/core/topology/links/json")
 def links():
+  if request.args.get('proxy') == None:
+    host = ONOS_LOCAL_HOST
+  else:
+    host = ONOS_GUI3_HOST
+
   try:
-    command = "curl -s %s/wm/core/topology/links/json" % (ONOS_HOST)
+    command = "curl -s %s/wm/core/topology/links/json" % (host)
     print command
     result = os.popen(command).read()
   except:
@@ -86,10 +94,14 @@
   return resp
 
 @app.route("/wm/flow/getall/json")
-@app.route("/proxy/wm/flow/getall/json")
 def flows():
+  if request.args.get('proxy') == None:
+    host = ONOS_LOCAL_HOST
+  else:
+    host = ONOS_GUI3_HOST
+
   try:
-    command = "curl -s %s/wm/flow/getall/json" % (ONOS_HOST)
+    command = "curl -s %s/wm/flow/getall/json" % (host)
     print command
     result = os.popen(command).read()
   except:
@@ -100,10 +112,14 @@
   return resp
 
 @app.route("/wm/registry/controllers/json")
-@app.route("/proxy/wm/registry/controllers/json")
 def registry_controllers():
+  if request.args.get('proxy') == None:
+    host = ONOS_LOCAL_HOST
+  else:
+    host = ONOS_GUI3_HOST
+
   try:
-    command = "curl -s %s/wm/registry/controllers/json" % (ONOS_HOST)
+    command = "curl -s %s/wm/registry/controllers/json" % (host)
     print command
     result = os.popen(command).read()
   except:
@@ -114,10 +130,14 @@
   return resp
 
 @app.route("/wm/registry/switches/json")
-@app.route("/proxy/wm/registry/switches/json")
 def registry_switches():
+  if request.args.get('proxy') == None:
+    host = ONOS_LOCAL_HOST
+  else:
+    host = ONOS_GUI3_HOST
+
   try:
-    command = "curl -s %s/wm/registry/switches/json" % (ONOS_HOST)
+    command = "curl -s %s/wm/registry/switches/json" % (host)
     print command
     result = os.popen(command).read()
   except: