Skip to content

Commit 87f76a3

Browse files
docs(security): note DefaultOrigin is a single global, not per-tenant
Address the MEDIUM review point on #1323: operator-driven register/resend point every tenant's e-mail link at the one DefaultOrigin SPA. Fits the kit's single-dashboard model; a per-tenant-custom-domain deployment would resolve the recipient tenant's own origin instead.
1 parent c8a894a commit 87f76a3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/content/docs/security/cors-and-headers.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: CORS & security headers
3-
lastUpdated: 2026-07-02
3+
lastUpdated: 2026-07-13
44
description: CORS-before-HTTPS-redirect ordering, the SignalR-credentialed-CORS gotcha, and the production security headers the kit emits by default.
55
sidebar:
66
label: CORS & headers
@@ -68,6 +68,7 @@ Links that land on a front-end SPA — the password-reset and e-mail-confirmatio
6868
- **Self-service flows** (`forgot-password`, `self-register`) build the link from the request `Origin` header, validated against `AllowedOrigins` and returned as the canonical list entry — so with more than one SPA each user gets a link back to the app they started from. Because forgot-password is anonymous this is a security boundary: a **forged/unlisted `Origin` is rejected with `400`** rather than turned into a link. A request with **no** `Origin` header (curl, the Scalar try-it UI, mobile, server-to-server) falls back to `DefaultOrigin` instead of failing.
6969
- **Operator-driven flows** (`register`, `resend-confirmation-email`) target `DefaultOrigin` — the recipient's app — not the calling operator's origin, so a tenant user provisioned from the admin console gets a link into the tenant app, not the console.
7070
- Matching is component-wise (scheme + host + port, port exact). Startup validation **fails the boot** if neither `AllowedOrigins` nor `DefaultOrigin` is set, so a missing config surfaces loudly instead of 500-ing on the first reset. `appsettings.Production.json` ships both empty — you must configure them (see the [production checklist](/docs/security/production-checklist/)).
71+
- `DefaultOrigin` is a **single global**, not per-tenant or custom-domain aware, so operator-driven `register` / `resend-confirmation-email` point every tenant's link at that one SPA. That fits the kit's single-dashboard model; a deployment with per-tenant custom domains would need to resolve the recipient tenant's own origin instead.
7172

7273
(`OriginOptions:OriginUrl` is unrelated: it's the API's own public base for back-end-served assets such as avatar URLs, exposed via `IRequestContext.Origin`.)
7374

0 commit comments

Comments
 (0)