fix: isInternalUrl helper returns true for other cloud-hosted workspaces
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import escapeRegExp from "lodash/escapeRegExp";
|
||||
import env from "../env";
|
||||
import { RESERVED_SUBDOMAINS, getBaseDomain, parseDomain } from "./domains";
|
||||
import { parseDomain } from "./domains";
|
||||
|
||||
/**
|
||||
* Prepends the CDN url to the given path (If a CDN is configured).
|
||||
@@ -37,8 +37,7 @@ export function isInternalUrl(href: string) {
|
||||
|
||||
return (
|
||||
outline.host === domain.host ||
|
||||
(domain.host.endsWith(getBaseDomain()) &&
|
||||
!RESERVED_SUBDOMAINS.find((reserved) => domain.host.startsWith(reserved)))
|
||||
(typeof window !== "undefined" && window.location.hostname === domain.host)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user