Proxy api requests

This commit is contained in:
Matteo Gheza 2021-12-22 23:06:00 +01:00
parent 7c8c565cba
commit 62b8dfa232
2 changed files with 11 additions and 2 deletions

View File

@ -94,10 +94,12 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "allerta-vvf:build:production"
"browserTarget": "allerta-vvf:build:production",
"proxyConfig": "proxy.conf.json"
},
"development": {
"browserTarget": "allerta-vvf:build:development"
"browserTarget": "allerta-vvf:build:development",
"proxyConfig": "proxy.conf.json"
}
},
"defaultConfiguration": "development"

7
frontend/proxy.conf.json Normal file
View File

@ -0,0 +1,7 @@
{
"/api": {
"target": "http://127.0.0.1:8080",
"secure": false,
"changeOrigin": true
}
}