From 4e95958ea6335168afb779ee46b3576b23272336 Mon Sep 17 00:00:00 2001 From: limbo <43649186+HUAHUAI23@users.noreply.github.com> Date: Sat, 14 Sep 2024 17:16:50 +0800 Subject: [PATCH] fix(objectstorage): Fix site hosting errors for domains (#5082) --- .../providers/objectstorage/src/pages/api/site/openHost.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/providers/objectstorage/src/pages/api/site/openHost.ts b/frontend/providers/objectstorage/src/pages/api/site/openHost.ts index 6b2bf6c036c..535aa8f0301 100644 --- a/frontend/providers/objectstorage/src/pages/api/site/openHost.ts +++ b/frontend/providers/objectstorage/src/pages/api/site/openHost.ts @@ -12,6 +12,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse< if (!bucket) return jsonRes(res, { code: 400, data: { error: 'bucketName is invaild' } }); + const domain = process.env.SEALOS_DOMAIN; + const appName = `static-host-${bucket}`; const result = await appLanuchPadClient.post( '/createApp', @@ -32,7 +34,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse< protocol: 'HTTP', openPublicDomain: true, publicDomain: appName, - customDomain: '' + customDomain: '', + domain: domain } ], envs: [],