Portal decision B: client portal on my.debtrecoveryexperts.com

- DRE_BASE_URL -> https://my.debtrecoveryexperts.com (magic links, team notify)
- CORS allow_origins adds https://my.debtrecoveryexperts.com
- magic-link path /portal/verify -> /verify (client portal is domain root, not a subpath)
This commit is contained in:
root
2026-08-21 18:50:05 -04:00
parent be0750d001
commit 7a5603b495
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ DRE_DB_PATH=/opt/dre-portal/data/dre.db
DRE_UPLOAD_DIR=/opt/dre-portal/data/uploads DRE_UPLOAD_DIR=/opt/dre-portal/data/uploads
# Base URL for magic-link emails # Base URL for magic-link emails
DRE_BASE_URL=https://portal.debtrecoveryexperts.com DRE_BASE_URL=https://my.debtrecoveryexperts.com
# SMTP relay (germainebrown.com:2525 STARTTLS) — best-effort, failures never fail the request # SMTP relay (germainebrown.com:2525 STARTTLS) — best-effort, failures never fail the request
DRE_SMTP_HOST=mail.germainebrown.com DRE_SMTP_HOST=mail.germainebrown.com
+3 -3
View File
@@ -48,7 +48,7 @@ def send_email(to_addr: str, subject: str, body_text: str, html: str | None = No
def notify_team_intake(claim_number: str, client_number: str, company_name: str, def notify_team_intake(claim_number: str, client_number: str, company_name: str,
amount_cents: int, debtor_name: str) -> bool: amount_cents: int, debtor_name: str) -> bool:
team = _env("DRE_TEAM_NOTIFY", "dre@debtrecoveryexperts.com") team = _env("DRE_TEAM_NOTIFY", "dre@debtrecoveryexperts.com")
base = _env("DRE_BASE_URL", "https://portal.debtrecoveryexperts.com") base = _env("DRE_BASE_URL", "https://my.debtrecoveryexperts.com")
dollars = amount_cents / 100.0 dollars = amount_cents / 100.0
body = ( body = (
f"New claim submitted via portal.\n\n" f"New claim submitted via portal.\n\n"
@@ -70,8 +70,8 @@ def notify_team_intake(claim_number: str, client_number: str, company_name: str,
def send_magic_link(to_addr: str, raw_token: str, client_number: str) -> bool: def send_magic_link(to_addr: str, raw_token: str, client_number: str) -> bool:
base = _env("DRE_BASE_URL", "https://portal.debtrecoveryexperts.com") base = _env("DRE_BASE_URL", "https://my.debtrecoveryexperts.com")
link = f"{base}/portal/verify?token={raw_token}" link = f"{base}/verify?token={raw_token}"
body = ( body = (
f"Hello,\n\n" f"Hello,\n\n"
f"Click the link below to log in to your DRE client portal. " f"Click the link below to log in to your DRE client portal. "
+1 -1
View File
@@ -23,7 +23,7 @@ app = FastAPI(title="DRE Customer Portal API", version="1.0.0", docs_url="/docs"
app.add_middleware( app.add_middleware(
CORSMiddleware, CORSMiddleware,
allow_origins=["https://portal.debtrecoveryexperts.com", "http://127.0.0.1:8093"], allow_origins=["https://portal.debtrecoveryexperts.com", "https://my.debtrecoveryexperts.com", "http://127.0.0.1:8093"],
allow_methods=["GET", "POST", "PATCH"], allow_methods=["GET", "POST", "PATCH"],
allow_headers=["*"], allow_headers=["*"],
) )