Be more specific when detecting sandbox (#8432)

* Be more specific when detecting sandbox

* Fix typo in domain
This commit is contained in:
Tomas Touceda 2022-10-25 18:35:49 -03:00 committed by GitHub
parent 1f39b73b2d
commit 8185254088
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ export const AuthenticatedRoutes = ({
// this works with App.tsx. if authToken does
// exist, user state is checked and fetched if null
if (!authToken()) {
if (window.location.hostname.includes("sandbox")) {
if (window.location.hostname.includes(".sandbox.fleetdm.com")) {
window.location.href = "https://www.fleetdm.com/try-fleet/login";
}