Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

limit localhost url to port 8888 only

Steven Tey301fc66a82d6
diff --git a/packages/embeds/core/src/core.ts b/packages/embeds/core/src/core.ts
index 4cb726e813..07caac1158 100644
--- a/packages/embeds/core/src/core.ts
+++ b/packages/embeds/core/src/core.ts
@@ -46,8 +46,9 @@ class DubEmbed {
});
const host = window.location.hostname;
+ const port = window.location.port;
const embedUrlHost =
- host === "localhost"
+ host === "localhost" && port === "8888"
? "http://localhost:8888"
: host === "preview.dub.co"
? "https://preview.dub.co"