Merge branch 'dev'
CI/CD / deploy (push) Successful in 2m23s
Details
CI/CD / deploy (push) Successful in 2m23s
Details
This commit is contained in:
commit
8f788fcf93
|
|
@ -4070,6 +4070,14 @@ const server = Bun.serve<WSData>({
|
||||||
|
|
||||||
// ── Subdomain routing: {space}.rspace.online/{moduleId}/... ──
|
// ── Subdomain routing: {space}.rspace.online/{moduleId}/... ──
|
||||||
if (subdomain) {
|
if (subdomain) {
|
||||||
|
// ── Guard: module IDs are not space slugs ──
|
||||||
|
// Redirect rcred.rspace.online → demo.rspace.online/rcred (not a space)
|
||||||
|
const allModuleIds = new Set(getAllModules().map(m => m.id));
|
||||||
|
if (allModuleIds.has(subdomain.toLowerCase())) {
|
||||||
|
const pathSuffix = url.pathname === "/" ? "" : url.pathname;
|
||||||
|
return Response.redirect(`${proto}//demo.rspace.online/${subdomain}${pathSuffix}${url.search}`, 302);
|
||||||
|
}
|
||||||
|
|
||||||
// ── Auto-provision personal space on first visit ──
|
// ── Auto-provision personal space on first visit ──
|
||||||
// Fast path: communityExists is an in-memory Map check for cached spaces.
|
// Fast path: communityExists is an in-memory Map check for cached spaces.
|
||||||
if (!(await communityExists(subdomain))) {
|
if (!(await communityExists(subdomain))) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue