From 54e79d3c0817bdc3b54fff572b8b53338ff25663 Mon Sep 17 00:00:00 2001 From: Steven Tey Date: Tue, 24 Sep 2024 10:46:49 -0700 Subject: [PATCH] feat: Add backlink to booking page (#16778) * FEAT: Add backlink to booking page * restrict to cal.com only --------- Co-authored-by: Peer Richelsen --- apps/web/next.config.js | 16 ++++++++++++++++ packages/lib/constants.ts | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/apps/web/next.config.js b/apps/web/next.config.js index d61529fd41..30355a8d3b 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -438,6 +438,22 @@ const nextConfig = { // COEP require-corp header is set conditionally when flag.coep is set to true headers: [CORP_CROSS_ORIGIN_HEADER], }, + { + source: "/:path*", + has: [ + { + type: "host", + value: "cal.com", + }, + ], + headers: [ + // make sure to pass full referer URL for booking pages + { + key: "Referrer-Policy", + value: "no-referrer-when-downgrade", + }, + ], + }, // These resources loads through embed as well, so they need to have CORP_CROSS_ORIGIN_HEADER ...[ { diff --git a/packages/lib/constants.ts b/packages/lib/constants.ts index 1b0c40237c..ba0eb02454 100644 --- a/packages/lib/constants.ts +++ b/packages/lib/constants.ts @@ -79,7 +79,7 @@ export const ANDROID_CHROME_ICON_256 = "/android-chrome-256x256.png"; export const ROADMAP = "https://cal.com/roadmap"; export const DESKTOP_APP_LINK = "https://cal.com/download"; export const JOIN_COMMUNITY = "https://github.com/calcom/cal.com/discussions"; -export const POWERED_BY_URL = `${WEBSITE_URL}/?utm_source=embed&utm_medium=powered-by-button`; +export const POWERED_BY_URL = "https://go.cal.com/booking"; export const DOCS_URL = "https://cal.com/docs"; export const DEVELOPER_DOCS = "https://developer.cal.com"; export const SEO_IMG_DEFAULT = `${CAL_URL}/og-image.png`;