From 7afc49856b5a0c97bac7ea5ddd02929b91eea33f Mon Sep 17 00:00:00 2001
From: Jonas Leder <jonas.leder@jobrouter.com>
Date: Wed, 16 Mar 2022 11:29:27 +0100
Subject: [PATCH] add proxy for api endpoint

---
 package.json      | 2 +-
 proxy.config.json | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
 create mode 100644 proxy.config.json

diff --git a/package.json b/package.json
index cbb6e5b..5f494fe 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
   "version": "0.0.0",
   "scripts": {
     "ng": "ng",
-    "start": "ng serve",
+    "start": "ng serve --proxy-config proxy.config.json",
     "build": "ng build",
     "watch": "ng build --watch --configuration development",
     "test": "ng test"
diff --git a/proxy.config.json b/proxy.config.json
new file mode 100644
index 0000000..d1abf45
--- /dev/null
+++ b/proxy.config.json
@@ -0,0 +1,8 @@
+{
+    "/api/*": {
+    "target": "http://localhost:1234",
+    "secure": false,
+    "logLevel": "debug",
+    "changeOrigin": true
+  }
+}
\ No newline at end of file
-- 
GitLab