Skip to content

Scheduling infrastructure for absolutely everyone.

fix: embed booking 404 (#9652)

Hariom Balhara4cc8a6fbf4af
diff --git a/apps/web/next.config.js b/apps/web/next.config.js
index b86bd43e135..c108717e434 100644
--- a/apps/web/next.config.js
+++ b/apps/web/next.config.js
@@ -186,8 +186,9 @@ const nextConfig = {
// .* matches / as well(Note: *(i.e wildcard) doesn't match / but .*(i.e. RegExp) does)
// It would match /free/30min but not /bookings/upcoming because 'bookings' is an item in pages
// It would also not match /free/30min/embed because we are ensuring just two slashes
- const userTypeRouteRegExp = `/:user((?!${pages.join("|")})[^/]*)/:type`;
-
+ // ?!book ensures it doesn't match /free/book page which doesn't have a corresponding new-booker page.
+ // [^/]+ makes the RegExp match the full path, it seems like a partial match doesn't work.
+ const userTypeRouteRegExp = `/:user((?!${pages.join("|")})[^/]*)/:type((?!book)[^/]+)`;
let rewrites = [
{
source: "/org/:slug",