Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
better subdomain handling
Oleg Isonen9f463c31c915
diff --git a/app/routes/index.tsx b/app/routes/index.tsxindex e18a6010cc..44d5c874a1 100644--- a/app/routes/index.tsx+++ b/app/routes/index.tsx@@ -13,9 +13,13 @@ export const loader: LoaderFunction = async ({ request }) => {request.headers.get("x-forwarded-host") ||request.headers.get("host") ||"";- const [userDomain, designerDomain] = host.split(".");++ const [userDomain, wstdDomain] = host.split(".");// We render the site from a subdomain- if (typeof userDomain === "string" && typeof designerDomain === "string") {+ if (+ typeof userDomain === "string" &&+ (wstdDomain === "wstd" || wstdDomain?.includes("localhost"))+ ) {try {const tree = await db.tree.loadByDomain(userDomain);const props = await db.props.loadByTreeId(tree.id);