cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

fix: allow multiple levels of subdomains in organization urls

Open victormattosvm opened this issue 5 months ago • 9 comments

What does this PR do?

It was not possible to use multiple levels of subdomains in organization URLs.

Examples: Works: org.domain.com Does not work: org.calendar.domain.com

This PR fixes this by replacing the old code snippet that checked for more than one subdomain level, returning null. Now, it doesn't have this verification and returns the correct org slug.

Mandatory Tasks (DO NOT REMOVE)

  • [x] I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • [x] N/A
  • [x] I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Create an organization with more than one subdomain level, such as org.calendar, and try accessing an event type URL. It will not be accessible. This PR resolves that issue.

victormattosvm avatar Sep 20 '24 02:09 victormattosvm