fix(spaces): redirect to subdomain URL after space creation

Create-space form redirected to /{slug}/rspace which 404s on subdomain
hosts (jeff.rspace.online/mycofi/rspace → rewritten to /jeff/mycofi/rspace).
Now redirects to https://{slug}.rspace.online/rspace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-03-20 16:45:35 -07:00
parent 93b7251054
commit 4f1eab3104
2 changed files with 2 additions and 2 deletions

View File

@ -357,7 +357,7 @@ spaces.post("/", async (c) => {
name: result.name, name: result.name,
visibility: result.visibility, visibility: result.visibility,
ownerDID: result.ownerDID, ownerDID: result.ownerDID,
url: `/${result.slug}/rspace`, url: `https://${result.slug}.rspace.online/rspace`,
}, 201); }, 201);
}); });

View File

@ -386,7 +386,7 @@
throw new Error(data.error || "Failed to create space"); throw new Error(data.error || "Failed to create space");
} }
window.location.href = `/${slug}/rspace`; window.location.href = `https://${slug}.rspace.online/rspace`;
} catch (err) { } catch (err) {
errorMessage.textContent = err.message; errorMessage.textContent = err.message;
errorMessage.style.display = "block"; errorMessage.style.display = "block";