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.

more fixes

Steven Tey909f7e7aaa93
diff --git a/apps/web/lib/edge-config.ts b/apps/web/lib/edge-config.ts
index 5b08f65dce..8c206aafdb 100644
--- a/apps/web/lib/edge-config.ts
+++ b/apps/web/lib/edge-config.ts
@@ -64,17 +64,8 @@ export const isBlacklistedEmail = async (email: string) => {
};
export const isReservedKey = async (key: string) => {
- if (!process.env.EDGE_CONFIG) {
- // If EDGE_CONFIG is not set, these are the default reserved keys
- return [
- "blog",
- "help",
- "pricing",
- "changelog",
- "metatags",
- "terms",
- "privacy",
- ].includes(key);
+ if (!process.env.NEXT_PUBLIC_IS_DUB) {
+ return false;
}
let reservedKeys;
try {
@@ -86,6 +77,9 @@ export const isReservedKey = async (key: string) => {
};
export const isReservedUsername = async (key: string) => {
+ if (!process.env.NEXT_PUBLIC_IS_DUB) {
+ return false;
+ }
let reservedUsernames;
try {
reservedUsernames = await get("reservedUsernames");
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 6f033ec2de..d2801a9b7b 100644
--- a/apps/web/ui/modals/add-edit-link-modal/index.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal/index.tsx
@@ -538,7 +538,9 @@ function AddEditLinkModal({
<p className="mt-2 text-sm text-red-600" id="key-error">
{keyError}
</p>
- ) : process.env.NEXT_PUBLIC_IS_DUB && isDubDomain(domain) ? (
+ ) : process.env.NEXT_PUBLIC_IS_DUB &&
+ isDubDomain(domain) &&
+ domain !== "dub.sh" ? (
<p className="mt-2 text-sm text-gray-500">
You can only create up to 25 links with this domain.
</p>