From 94c02d17f571bc2868afd789166d07b4322be6e7 Mon Sep 17 00:00:00 2001 From: phil Date: Wed, 28 Feb 2024 12:35:25 +0530 Subject: [PATCH] Fix ng serve error message: refector proxy.conf.json --- proxy.conf.json | 84 +++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 45 deletions(-) diff --git a/proxy.conf.json b/proxy.conf.json index 467a131..0f8efa3 100644 --- a/proxy.conf.json +++ b/proxy.conf.json @@ -1,47 +1,41 @@ -{ - "/static": { - "target": "http://127.0.0.1:5000", - "secure": false +[ + { + "context": [ + "/static", + "/gj", + "/openapi.json", + "/docs", + "/api" + ], + "target": "http://127.0.0.1:5000", + "secure": false, + "ws": true }, - "/gj": { - "target": "http://127.0.0.1:5000", - "secure": false, - "ws": true - }, - "/sched": { - "target": "http://127.0.0.1:8000", - "secure": false - }, - "/_sched": { - "target": "http://127.0.0.1:8000", - "secure": false, - "ws": true - }, - "/openapi.json": { - "target": "http://127.0.0.1:5000", - "secure": false, - "ws": true - }, - "/docs": { - "target": "http://127.0.0.1:5000", - "secure": false, - "ws": true - }, - "/api": { - "target": "http://127.0.0.1:5000", - "secure": false, - "ws": true - }, - "/static/tiles": { - "target": "/home/phil/gisaf_misc/map/tiles", - "secure": false, - "changeOrigin": true, - "pathRewrite": { - "^/static/tiles" : "" + { + "context": [ + "/sched", + "/_sched" + ], + "target": "http://127.0.0.1:8000", + "secure": false, + "ws": true + }, + { + "context": [ + "/static/tiles" + ], + "target": "/home/phil/gisaf_misc/map/tiles", + "secure": false, + "changeOrigin": true, + "pathRewrite": { + "^/static/tiles" : "" + } + }, + { + "context": [ + "/terrain" + ], + "target": "http://127.0.0.1:8899", + "secure": false } - }, - "/terrain": { - "target": "http://127.0.0.1:8899", - "secure": false - } -} +] \ No newline at end of file