Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit f06dc65

Browse files
authored
Merge pull request #4580 from withspectrum/fix-login-redirects
Fix login redirects
2 parents c1b8f0f + 9e0bc65 commit f06dc65

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/utils/is-spectrum-url.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export default (url: string): boolean => {
1616
const { hostname, protocol } = new URL(url);
1717
// hostname might be spectrum.chat or subdomain.spectrum.chat, so we use .endsWith
1818
// We don't just check .contains because otherwise folks could make spectrum.chat.mydomain.com
19-
const IS_SPECTRUM_URL = hostname.endsWith('.spectrum.chat');
19+
const IS_SPECTRUM_URL =
20+
hostname === 'spectrum.chat' || hostname === 'alpha.spectrum.chat';
2021
const IS_LOCALHOST = hostname === 'localhost';
2122
const IS_HTTP = protocol === 'https:' || protocol === 'http:';
2223
// Make sure the passed redirect URL is a spectrum.chat one or (in development) localhost

0 commit comments

Comments
 (0)