From ada8a8470e3fe67658654ca584f2e745eed3b556 Mon Sep 17 00:00:00 2001 From: alexander-schefe Date: Mon, 22 Sep 2025 12:34:50 +0200 Subject: [PATCH 1/2] fix: use FRONTEND_URL instead of URL_ORIGIN --- packages/backend/src/services/email.service.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/services/email.service.ts b/packages/backend/src/services/email.service.ts index 7457f513..b2ceba47 100644 --- a/packages/backend/src/services/email.service.ts +++ b/packages/backend/src/services/email.service.ts @@ -7,15 +7,13 @@ import { allAdmins } from '../repositories/admin.repo' import { traineeById } from '../repositories/trainee.repo' import { trainerById } from '../repositories/trainer.repo' -const { STAGE, URL_ORIGIN } = process.env +const { FRONTEND_URL } = process.env const translations = (user: User): EmailTranslations => t('email', user.language, { interpolation: { prefix: 'turnOff', suffix: 'turnOff' } }) const envLink = (path: string) => { - const envDomain = STAGE === 'staging' ? 'staging.' : '' - - return `https://${envDomain}${URL_ORIGIN}${path}` + return `${FRONTEND_URL}${path}` } const trainerNotificationMailPayload = (receiver: Trainer, sender: Trainee, report: Report): EmailPayload => ({ From 3202c0fe10610807239291eeb6e5395b780b85db Mon Sep 17 00:00:00 2001 From: alexander-schefe Date: Mon, 22 Sep 2025 12:36:00 +0200 Subject: [PATCH 2/2] fix: removed URL_ORIGIN from workflows --- .env.example | 1 - .github/workflows/reusable-build-job.yml | 1 - .github/workflows/reusable-deploy-job.yml | 1 - readme.md | 4 ---- 4 files changed, 7 deletions(-) diff --git a/.env.example b/.env.example index f3b97c5d..81932c2c 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,6 @@ MICROSOFT_TENANT_ID = secret MICROSOFT_CLIENT_ID = secret AUTH_HEADER = secret -URL_ORIGIN = lara.exampleCompany DEBUG = true COMPANY_ABBREVIATION = exp diff --git a/.github/workflows/reusable-build-job.yml b/.github/workflows/reusable-build-job.yml index 6aa67139..c79b1fba 100644 --- a/.github/workflows/reusable-build-job.yml +++ b/.github/workflows/reusable-build-job.yml @@ -29,7 +29,6 @@ jobs: MICROSOFT_TENANT_ID: ${{ secrets.MICROSOFT_TENANT_ID }} MICROSOFT_CLIENT_ID: ${{ secrets.MICROSOFT_CLIENT_ID }} SUPPORT_MAIL: ${{ secrets.SUPPORT_MAIL }} - URL_ORIGIN: ${{ secrets.URL_ORIGIN }} COMPANY_ABBREVIATION: ${{ secrets.COMPANY_ABBREVIATION }} OLD_COMPANY_NAME: ${{ secrets.OLD_COMPANY_NAME }} NEW_COMPANY_NAME: ${{ secrets.NEW_COMPANY_NAME }} diff --git a/.github/workflows/reusable-deploy-job.yml b/.github/workflows/reusable-deploy-job.yml index 6bc7085f..809b7555 100644 --- a/.github/workflows/reusable-deploy-job.yml +++ b/.github/workflows/reusable-deploy-job.yml @@ -39,7 +39,6 @@ jobs: LARA_SECRET: ${{ secrets.LARA_SECRET }} SES_EMAIL: ${{ secrets.SES_EMAIL }} SUPPORT_MAIL: ${{ secrets.SUPPORT_MAIL }} - URL_ORIGIN: ${{ secrets.URL_ORIGIN }} COMPANY_ABBREVIATION: ${{ secrets.COMPANY_ABBREVIATION }} OLD_COMPANY_NAME: ${{ secrets.OLD_COMPANY_NAME }} NEW_COMPANY_NAME: ${{ secrets.NEW_COMPANY_NAME }} diff --git a/readme.md b/readme.md index a4d4807f..b0ab8cfe 100644 --- a/readme.md +++ b/readme.md @@ -113,8 +113,6 @@ PDF printing is developed inside `packages/print`. Run `yarn debug` inside this - String containing AWS IAM User ID used for deployment - AWS_SECRET_ACCESS_KEY - String containing AWS IAM User Secret Key used for deployment -- URL_ORIGIN - - String containing the origin of the environments. Used in emails. E.g.: lara.exampleCompany - COMPANY_ABBREVIATION - Shortform of your companies name to create s3-buckets - OLD_COMPANY_NAME @@ -151,8 +149,6 @@ The following variables can be added to your cloned version of Lara. - String containing AWS IAM User Secret Key used for deployment - AUTH_HEADER - String containing the value for the authorization header -- URL_ORIGIN - - String containing the origin of the environments. Used in emails. E.g.: lara.exampleCompany - DEBUG - More information is shown in the console. Not necessary for production. - COMPANY_ABBREVIATION