The open source coding agent.
TypeScript
fix webdomain
Dax Raadaeea84a87762
diff --git a/infra/app.ts b/infra/app.tsindex 1123e3a6b89..834936b7142 100644--- a/infra/app.ts+++ b/infra/app.ts@@ -9,6 +9,9 @@ const bucket = new sst.cloudflare.Bucket("Bucket")export const api = new sst.cloudflare.Worker("Api", {domain: `api.${domain}`,handler: "packages/function/src/api.ts",+ environment: {+ WEB_DOMAIN: domain,+ },url: true,link: [bucket],transform: {diff --git a/packages/function/src/api.ts b/packages/function/src/api.tsindex 0d5e44df10a..701b9854bf1 100644--- a/packages/function/src/api.ts+++ b/packages/function/src/api.ts@@ -4,6 +4,7 @@ import { randomUUID } from "node:crypto"type Env = {SYNC_SERVER: DurableObjectNamespace<SyncServer>Bucket: R2Bucket+ WEB_DOMAIN: string}export class SyncServer extends DurableObject<Env> {@@ -127,7 +128,7 @@ export default {return new Response(JSON.stringify({secret,- url: "https://opencode.ai/s/" + short,+ url: `https://${env.WEB_DOMAIN}/s/${short}`,}),{headers: { "Content-Type": "application/json" },