mirror of
https://github.com/hanzoai/calendar.git
synced 2026-09-24 22:42:24 +00:00
fix(type): the two references that were left pointing at files that are gone
The OG route still fetched /fonts/cal.ttf for its display weight after that file was deleted, so every share card would have rendered with one of its three faces missing — a break the previous commit introduced. Zen SemiBold. And the embed theme's stored default was fontSrc "https://cal.com/cal.ttf", written into every branded booking page, so a customer's own page fetched its face from our upstream's host. It is same-origin now.
This commit is contained in:
@@ -37,7 +37,7 @@ async function handler(req: NextRequest) {
|
||||
|
||||
try {
|
||||
const fontResults = await Promise.allSettled([
|
||||
fetch(new URL("/fonts/cal.ttf", WEBAPP_URL)).then((res) => res.arrayBuffer()),
|
||||
fetch(new URL("/fonts/Zen-SemiBold.ttf", WEBAPP_URL)).then((res) => res.arrayBuffer()),
|
||||
fetch(new URL("/fonts/Zen-Regular.ttf", WEBAPP_URL)).then((res) => res.arrayBuffer()),
|
||||
fetch(new URL("/fonts/Zen-Medium.ttf", WEBAPP_URL)).then((res) => res.arrayBuffer()),
|
||||
]);
|
||||
|
||||
Binary file not shown.
@@ -541,8 +541,11 @@ export const DeploymentTheme = z
|
||||
bookingMedian: z.string().default("#494949"),
|
||||
bookingDark: z.string().default("#313131"),
|
||||
bookingDarker: z.string().default("#292929"),
|
||||
fontName: z.string().default("Cal Sans"),
|
||||
fontSrc: z.string().default("https://cal.com/cal.ttf"),
|
||||
fontName: z.string().default("Zen"),
|
||||
// Same-origin: this default is written into customer-facing embeds, and the
|
||||
// one it replaced pointed at cal.com, so every branded booking page fetched
|
||||
// its face from our upstream's host.
|
||||
fontSrc: z.string().default("/fonts/Zen-Variable.woff2"),
|
||||
})
|
||||
.optional();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user