This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch feature/5.0.0
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking-ui.git

commit f53f97eed75d0999dee5178bddc83b989c772bc4
Author: hanahmily <hanahm...@gmail.com>
AuthorDate: Fri Feb 2 11:09:41 2018 +0800

    Add proxy to backend
---
 src/main/frontend/{.roadhogrc => .roadhogrc.js} | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/src/main/frontend/.roadhogrc b/src/main/frontend/.roadhogrc.js
old mode 100755
new mode 100644
similarity index 64%
rename from src/main/frontend/.roadhogrc
rename to src/main/frontend/.roadhogrc.js
index e64dacf..87332f0
--- a/src/main/frontend/.roadhogrc
+++ b/src/main/frontend/.roadhogrc.js
@@ -1,4 +1,4 @@
-{
+const config = {
   "entry": "src/index.js",
   "extraBabelPlugins": [
     "transform-runtime",
@@ -20,4 +20,19 @@
   },
   "ignoreMomentLocale": true,
   "theme": "./src/theme.js"
+};
+
+if (process.env.NO_PROXY) {
+  config.proxy = {
+    "/api":{
+      target: "http://localhost:12800";,
+      changeOrigin: true,
+      pathRewrite:  (path) => {
+        console.log(path);
+        return "/graphql"
+      }
+    }
+  };
 }
+
+export default config;

-- 
To stop receiving notification emails like this one, please contact
hanahm...@apache.org.

Reply via email to