Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: assign storage port from public url

Qiao Han1d58c84c67da
diff --git a/studio/pages/api/storage/[ref]/buckets/[id]/objects/sign.ts b/studio/pages/api/storage/[ref]/buckets/[id]/objects/sign.ts
index d235508ab84..c89791ab5f3 100644
--- a/studio/pages/api/storage/[ref]/buckets/[id]/objects/sign.ts
+++ b/studio/pages/api/storage/[ref]/buckets/[id]/objects/sign.ts
@@ -29,7 +29,7 @@ const handlePost = async (req: NextApiRequest, res: NextApiResponse) => {
// change the domain name to the SUPABASE_PUBLIC_URL since SUPABASE_URL is not accessible from the client
const signedUrl = new URL(data.signedUrl)
- signedUrl.hostname = new URL(process.env.SUPABASE_PUBLIC_URL!).hostname
+ signedUrl.host = new URL(process.env.SUPABASE_PUBLIC_URL!).host
data.signedUrl = signedUrl.href
return res.status(200).json(data)