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.

fix: Env variables

Andras Bacsai4866287d1937
diff --git a/apps/designer/.env.example b/apps/designer/.env.example
index e19597ce62..81975b8e27 100644
--- a/apps/designer/.env.example
+++ b/apps/designer/.env.example
@@ -20,6 +20,6 @@ S3_SECRET_ACCESS_KEY=
ASSET_CDN_URL=
# Publish to edge
-EDGE_PUBLISHER_ENDPOINT=
-EDGE_DOMAIN=
-EDGE_TOKEN=
+PUBLISHER_ENDPOINT=
+PUBLISHER_DOMAIN=
+PUBLISHER_TOKEN=
diff --git a/apps/designer/app/designer/features/topbar/publish.tsx b/apps/designer/app/designer/features/topbar/publish.tsx
index 5ce1657a9a..6ace8c2680 100644
--- a/apps/designer/app/designer/features/topbar/publish.tsx
+++ b/apps/designer/app/designer/features/topbar/publish.tsx
@@ -20,8 +20,8 @@ import env from "~/shared/env";
type PublishButtonProps = { project: Project };
const host = () => {
- if (env.EDGE_PUBLISHER_ENDPOINT && env.EDGE_DOMAIN !== "") {
- return env.EDGE_DOMAIN;
+ if (env.PUBLISHER_ENDPOINT && env.PUBLISHER_DOMAIN !== "") {
+ return env.PUBLISHER_DOMAIN;
}
if (typeof location === "object") {
if (location.host.includes("webstudio.is")) return "wstd.io";
diff --git a/apps/designer/app/env.server.ts b/apps/designer/app/env.server.ts
index c23608fa8d..515e5dedef 100644
--- a/apps/designer/app/env.server.ts
+++ b/apps/designer/app/env.server.ts
@@ -5,8 +5,8 @@ const env = {
VERCEL_ENV: process.env.VERCEL_ENV,
DEBUG: process.env.DEBUG,
FEATURES: process.env.FEATURES,
- EDGE_PUBLISHER_ENDPOINT: process.env.EDGE_PUBLISHER_ENDPOINT,
- EDGE_DOMAIN: process.env.EDGE_DOMAIN,
+ PUBLISHER_ENDPOINT: process.env.PUBLISHER_ENDPOINT,
+ PUBLISHER_DOMAIN: process.env.PUBLISHER_DOMAIN,
} as const;
export default env;
diff --git a/apps/designer/app/routes/rest/publish.ts b/apps/designer/app/routes/rest/publish.ts
index 6e808853bb..d3518b57be 100644
--- a/apps/designer/app/routes/rest/publish.ts
+++ b/apps/designer/app/routes/rest/publish.ts
@@ -10,11 +10,11 @@ export const action: ActionFunction = async ({ request }) => {
}
try {
await db.misc.publish({ projectId, domain });
- if (process.env.EDGE_PUBLISHER_ENDPOINT) {
+ if (process.env.PUBLISHER_ENDPOINT) {
const headers = new Headers();
- headers.append("X-AUTH-WEBSTUDIO", process.env.EDGE_TOKEN || "");
+ headers.append("X-AUTH-WEBSTUDIO", process.env.PUBLISHER_TOKEN || "");
headers.append("Content-Type", "text/plain");
- const response = await fetch(process.env.EDGE_PUBLISHER_ENDPOINT, {
+ const response = await fetch(process.env.PUBLISHER_ENDPOINT, {
method: "PUT",
headers,
body: JSON.stringify({