Skip to content

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.

fixes

Andras Bacsai16433f3bf0e9
diff --git a/apps/designer/.env.example b/apps/designer/.env.example
index 81975b8e27..ff43cee560 100644
--- a/apps/designer/.env.example
+++ b/apps/designer/.env.example
@@ -1,3 +1,4 @@
+DESIGNER_DOMAIN=webstudio.is
DATABASE_URL=postgresql://user:pass@localhost/webstudio
AUTH_SECRET="# Linux: `openssl rand -hex 32` or go to https://generate-secret.now.sh/64"
GH_CLIENT_SECRET=
diff --git a/apps/designer/app/designer/features/topbar/publish.tsx b/apps/designer/app/designer/features/topbar/publish.tsx
index f95c079a92..2c23e169ad 100644
--- a/apps/designer/app/designer/features/topbar/publish.tsx
+++ b/apps/designer/app/designer/features/topbar/publish.tsx
@@ -23,13 +23,8 @@ const host = () => {
if (env.PUBLISHER_ENDPOINT && env.PUBLISHER_DOMAIN) {
return env.PUBLISHER_DOMAIN;
}
- if (typeof location === "object") {
- if (location.host.includes("webstudio.is")) return "wstd.io";
- else return location.host;
- }
- return "";
+ return env.DESIGNER_DOMAIN;
};
-console.log(host());
const Content = ({ project }: PublishButtonProps) => {
const id = useId();
diff --git a/apps/designer/app/env.server.ts b/apps/designer/app/env.server.ts
index 0bb6d6ae71..1c5eeb46f4 100644
--- a/apps/designer/app/env.server.ts
+++ b/apps/designer/app/env.server.ts
@@ -5,6 +5,7 @@ const env = {
VERCEL_ENV: process.env.VERCEL_ENV,
DEBUG: process.env.DEBUG,
FEATURES: process.env.FEATURES,
+ DESIGNER_DOMAIN: process.env.DESIGNER_DOMAIN,
PUBLISHER_ENDPOINT: process.env.PUBLISHER_ENDPOINT || null,
PUBLISHER_DOMAIN: process.env.PUBLISHER_DOMAIN || null,
} as const;
diff --git a/apps/designer/env-check.js b/apps/designer/env-check.js
index 85d818579e..577a10a3d1 100644
--- a/apps/designer/env-check.js
+++ b/apps/designer/env-check.js
@@ -13,7 +13,7 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
require("dotenv").config();
-const REQUIRED_ENVS = ["DATABASE_URL", "AUTH_SECRET"];
+const REQUIRED_ENVS = ["DATABASE_URL", "AUTH_SECRET", "DESIGNER_DOMAIN"];
const S3_KEYS = [
"S3_ENDPOINT",
"S3_REGION",