-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Single domain setup with one org #18383
base: main
Are you sure you want to change the base?
Conversation
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
apps/web/getSubdomainRegExp.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to getNextjsOrgRewriteConfig and made it more robust with better tests.
* app.company.cal.com -> app | ||
* app.company.com -> app | ||
*/ | ||
const getLeftMostSubdomain = (url) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed getDefaultSubdomain
-> getLeftMostSubdomain
return _url.hostname.match(regex)?.groups?.subdomain || null; | ||
}; | ||
|
||
const getRegExpNotMatchingLeftMostSubdomain = (url) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed getSubdomainRegExp
-> getRegExpNotMatchingLeftMostSubdomain
apps/web/next.config.js
Outdated
@@ -124,7 +123,7 @@ const matcherConfigRootPath = { | |||
has: [ | |||
{ | |||
type: "host", | |||
value: orgHostPath, | |||
value: nextJsOrgRewriteConfig.orgHostPath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if Single org setup isn't enabled the regex here should remain same
apps/web/next.config.js
Outdated
@@ -328,23 +328,23 @@ const nextConfig = { | |||
? [ | |||
{ | |||
...matcherConfigRootPath, | |||
destination: "/team/:orgSlug?isOrgProfile=1", | |||
destination: `/team/${orgSlug}?isOrgProfile=1`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if single org setup isn't enabled, orgSlug = ":orgSlug"
E2E results are ready! |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
What does this PR do?
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?