From bcc8b315caf94d2589cea842ef35c3f9bc5bb457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20M=C3=BCller?= Date: Mon, 27 Jul 2026 17:52:47 +0200 Subject: [PATCH] fix(backend): fixed cors error on build dev environment --- Dockerfile | 2 +- eeg_frontend/angular.json | 18 ++++++++++++++++++ .../src/environments/environment.staging.ts | 4 ++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 eeg_frontend/src/environments/environment.staging.ts diff --git a/Dockerfile b/Dockerfile index 4baed47..8e92352 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ COPY eeg_frontend/openapi.yaml ./ RUN npx openapi-generator-cli generate -i ./openapi.yaml -g typescript-angular -o ./src/app/api COPY eeg_frontend/ ./ -RUN npm run build -- --configuration production +RUN npm run build -- --configuration staging # ---- Stage 2: Build Spring Boot Backend ---- FROM maven:3.9-eclipse-temurin-21 AS backend-build diff --git a/eeg_frontend/angular.json b/eeg_frontend/angular.json index 4c5d8ec..3232bc4 100644 --- a/eeg_frontend/angular.json +++ b/eeg_frontend/angular.json @@ -48,6 +48,21 @@ ], "outputHashing": "all" }, + "staging": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kB", + "maximumError": "1MB" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "4kB", + "maximumError": "8kB" + } + ], + "outputHashing": "all" + }, "development": { "optimization": false, "extractLicenses": false, @@ -62,6 +77,9 @@ "production": { "buildTarget": "eeg_frontend:build:production" }, + "staging": { + "buildTarget": "eeg_frontend:build:production" + }, "development": { "buildTarget": "eeg_frontend:build:development" } diff --git a/eeg_frontend/src/environments/environment.staging.ts b/eeg_frontend/src/environments/environment.staging.ts new file mode 100644 index 0000000..01a4e5a --- /dev/null +++ b/eeg_frontend/src/environments/environment.staging.ts @@ -0,0 +1,4 @@ +export const environment = { + production: false, + apiUrl: 'https://preview.coolify.mueller-dev.com' +};