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.

fix

Steven Teye5f9b8fa6e45
diff --git a/apps/web/lib/api/links.ts b/apps/web/lib/api/links.ts
index cf249b9271..c2edbb61c1 100644
--- a/apps/web/lib/api/links.ts
+++ b/apps/web/lib/api/links.ts
@@ -287,7 +287,8 @@ export async function processLink({
status: 403,
};
}
- } else {
+ // internal Dub.co checks
+ } else if (process.env.NEXT_PUBLIC_IS_DUB) {
// if it's not a custom project, do some filtering
if (key?.includes("/")) {
return {
diff --git a/apps/web/ui/modals/add-edit-link-modal/index.tsx b/apps/web/ui/modals/add-edit-link-modal/index.tsx
index 5d67a61a60..6f033ec2de 100644
--- a/apps/web/ui/modals/add-edit-link-modal/index.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal/index.tsx
@@ -16,7 +16,6 @@ import {
import {
DEFAULT_LINK_PROPS,
GOOGLE_FAVICON_URL,
- SHORT_DOMAIN,
cn,
deepEqual,
getApexDomain,
@@ -28,12 +27,7 @@ import {
} from "@dub/utils";
import { type Link as LinkProps } from "@prisma/client";
import va from "@vercel/analytics";
-import {
- useParams,
- usePathname,
- useRouter,
- useSearchParams,
-} from "next/navigation";
+import { useParams, usePathname, useRouter } from "next/navigation";
import punycode from "punycode/";
import {
Dispatch,
@@ -544,7 +538,7 @@ function AddEditLinkModal({
<p className="mt-2 text-sm text-red-600" id="key-error">
{keyError}
</p>
- ) : domain !== SHORT_DOMAIN && isDubDomain(domain) ? (
+ ) : process.env.NEXT_PUBLIC_IS_DUB && isDubDomain(domain) ? (
<p className="mt-2 text-sm text-gray-500">
You can only create up to 25 links with this domain.
</p>