Configure proxy for API requests and remove hardcoded apiUrl from environment files.

This commit is contained in:
akastijn 2025-09-24 21:44:41 +02:00
parent 80cb2d0ad1
commit 4878ad9f0d
6 changed files with 10 additions and 4 deletions

View File

@ -76,6 +76,9 @@
}
},
"serve": {
"options": {
"proxyConfig": "proxy.conf.json"
},
"builder": "@angular/build:dev-server",
"configurations": {
"production": {

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

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

View File

@ -1,4 +1,3 @@
export const environment = {
production: true,
apiUrl: 'https://beta.alttd.com',
};

View File

@ -1,4 +1,3 @@
export const environment = {
production: false,
apiUrl: 'http://localhost:8080',
};

View File

@ -1,4 +1,3 @@
export const environment = {
production: true,
apiUrl: 'https://alttd.com',
};

View File

@ -1,4 +1,3 @@
export const environment = {
production: true,
apiUrl: 'https://alttd.com',
};