Fix hubspot callback (#3195)
Co-authored-by: Leo Giovanetti <[email protected]>
This commit is contained in:
1 parent
53bbbf793d
commit
1469b856a6
2 files changed
+7
-2
No files matched your search
@@ -1,7 +1,10 @@
|
||||
import { CONSOLE_URL, WEBAPP_URL, WEBSITE_URL } from "@calcom/lib/constants";
|
||||
|
||||
// It ensures that redirection URL safe where it is accepted through a query params or other means where user can change it.
|
||||
export const getSafeRedirectUrl = (url: string = "") => {
|
||||
export const getSafeRedirectUrl = (url = "") => {
|
||||
if (!url) {
|
||||
return null;
|
||||
}
|
||||
if (url.search(/^https?:\/\//) === -1) {
|
||||
throw new Error("Pass an absolute URL");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user