The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add openai-apps-challenge
Steven Tey636c172fff01
diff --git a/apps/web/app/wellknown/[domain]/[file]/route.ts b/apps/web/app/wellknown/[domain]/[file]/route.tsindex b582f59c49..8568c68d05 100644--- a/apps/web/app/wellknown/[domain]/[file]/route.ts+++ b/apps/web/app/wellknown/[domain]/[file]/route.ts@@ -17,6 +17,20 @@ export async function GET(return NextResponse.json({ error: "File not supported" }, { status: 400 });}+ if (file === "openai-apps-challenge") {+ if (domain !== "dub.sh") {+ return NextResponse.json(+ { error: "File not supported" },+ { status: 400 },+ );+ }+ return new Response(process.env.OPENAI_APPS_CHALLENGE_RESPONSE, {+ headers: {+ "Content-Type": "text/plain",+ },+ });+ }+const { appleAppSiteAssociation, assetLinks } =(await prisma.domain.findUnique({where: {diff --git a/apps/web/lib/well-known.ts b/apps/web/lib/well-known.tsindex fb67e5b11c..a70d9e6464 100644--- a/apps/web/lib/well-known.ts+++ b/apps/web/lib/well-known.ts@@ -6,11 +6,13 @@ export type WellKnownConfig = {};};"assetlinks.json": any[];+ "openai-apps-challenge": any;};export const supportedWellKnownFiles = ["apple-app-site-association","assetlinks.json",+ "openai-apps-challenge",];export type SupportedWellKnownFiles = keyof WellKnownConfig;