You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: allow whitelisted paths like onboarding as team/user slugs on org domains (calcom#24984)
* fix: allow whitelisted paths like onboarding as team/user slugs on org domains
- Add whitelistedPaths array to pagesAndRewritePaths.js with 'onboarding'
- Update getRegExpMatchingAllReservedRoutes to accept exclusions parameter
- Modify org route patterns to exclude whitelisted paths from reserved routes
- Add tests to verify onboarding can be used as a slug on org domains
- Fixes issue where acme.cal.com/onboarding would 404
This allows teams/users on org domains to use 'onboarding' as their slug
while still preserving the /onboarding app route on non-org domains.
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* Remove accidental change by AI
* Add special character handling test
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
// We don't allow all dashboard route names to be used as slug because people are probably accustomed to access links like acme.cal.com/workflows, acme.cal.com/event-types etc.
10
+
// So, we carefully allow, what is absolutely needed.
11
+
// Allowed to be a team/user slug in organization because onboarding is a common team name
12
+
'onboarding',
13
+
]
14
+
15
+
/**
16
+
* Extracts top-level route names from all pages/app files and excludes them from org rewrite.
17
+
* For example: /abc/def/ghi -> 'abc'
18
+
*
19
+
* These top-level route names are excluded from rewrites in beforeFiles in next.config.js
20
+
* to prevent conflicts with organization slug rewrites.
// Most files/dirs in public dir must not be rewritten to org pages. Ideally it should be all the content of public dir, but that can be done later
56
82
// It is important to exclude the embed pages separately here because with SINGLE_ORG_SLUG enabled, the entire domain is eligible for rewrite vs just the org subdomain otherwise
57
83
conststaticAssets=["embed"];
84
+
58
85
// FIXME: I am not sure why public is needed here, an asset 'test' in public isn't accessible through "/public/test" but only through "/test"
59
86
// We should infact scan through all files in public and exclude them instead.
0 commit comments