File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ const bucket = new sst.cloudflare.Bucket("Bucket")
99export const api = new sst . cloudflare . Worker ( "Api" , {
1010 domain : `api.${ domain } ` ,
1111 handler : "packages/function/src/api.ts" ,
12+ environment : {
13+ WEB_DOMAIN : domain ,
14+ } ,
1215 url : true ,
1316 link : [ bucket ] ,
1417 transform : {
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { randomUUID } from "node:crypto"
44type Env = {
55 SYNC_SERVER : DurableObjectNamespace < SyncServer >
66 Bucket : R2Bucket
7+ WEB_DOMAIN : string
78}
89
910export class SyncServer extends DurableObject < Env > {
@@ -127,7 +128,7 @@ export default {
127128 return new Response (
128129 JSON . stringify ( {
129130 secret,
130- url : " https://opencode.ai /s/" + short ,
131+ url : ` https://${ env . WEB_DOMAIN } /s/${ short } ` ,
131132 } ) ,
132133 {
133134 headers : { "Content-Type" : "application/json" } ,
You can’t perform that action at this time.
0 commit comments