From 1788c619acf1e8fafa4f08ae32a89f2c77606adf Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Tue, 14 Feb 2023 14:02:40 +0100 Subject: [PATCH] OZG-2574 OZG-3439 Fix Proxy config See https://angular.io/guide/build#proxy-multiple-entries --- goofy-client/angular.json | 3 ++- goofy-client/package.json | 4 ++-- goofy-client/{proxy.conf.json => proxy.conf.mjs} | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) rename goofy-client/{proxy.conf.json => proxy.conf.mjs} (90%) diff --git a/goofy-client/angular.json b/goofy-client/angular.json index eb185113ff..e09e52b2f5 100644 --- a/goofy-client/angular.json +++ b/goofy-client/angular.json @@ -378,7 +378,8 @@ "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { - "browserTarget": "goofy:build" + "browserTarget": "goofy:build", + "proxyConfig": "proxy.conf.mjs" }, "configurations": { "production": { diff --git a/goofy-client/package.json b/goofy-client/package.json index 07cdf1fc53..841492de89 100644 --- a/goofy-client/package.json +++ b/goofy-client/package.json @@ -4,8 +4,8 @@ "license": "MIT", "scripts": { "postinstall": "node ./decorate-angular-cli.js && ngcc --properties es2020 browser module main --first-only --create-ivy-entry-points", - "start": "nx serve --port 4300 --disable-host-check --proxy-config proxy.conf.json --verbose", - "start-for-screenreader": "nx serve --host 192.168.178.20 --port 4300 --disable-host-check --proxy-config proxy.conf.json --verbose", + "start": "nx serve --port 4300 --disable-host-check --verbose", + "start-for-screenreader": "nx serve --host 192.168.178.20 --port 4300 --disable-host-check --verbose", "start:devbe": "nx serve --port 4300 --disable-host-check --proxy-config proxy.dev.conf.json --verbose", "build": "nx build", "test": "node ./node_modules/.bin/nx run-many --target=test --all --parallel --maxParallel 8 --runInBand", diff --git a/goofy-client/proxy.conf.json b/goofy-client/proxy.conf.mjs similarity index 90% rename from goofy-client/proxy.conf.json rename to goofy-client/proxy.conf.mjs index 4c42232fa9..c16495c509 100644 --- a/goofy-client/proxy.conf.json +++ b/goofy-client/proxy.conf.mjs @@ -1,4 +1,4 @@ -[ +export default [ { "context": [ "/api", @@ -12,4 +12,4 @@ "secure": false, "logLevel": "debug" } -] \ No newline at end of file +]; \ No newline at end of file -- GitLab