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

Fix login redirects #4580

Merged
merged 1 commit into from
Jan 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/utils/is-spectrum-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export default (url: string): boolean => {
const { hostname, protocol } = new URL(url);
// hostname might be spectrum.chat or subdomain.spectrum.chat, so we use .endsWith
// We don't just check .contains because otherwise folks could make spectrum.chat.mydomain.com
const IS_SPECTRUM_URL = hostname.endsWith('.spectrum.chat');
const IS_SPECTRUM_URL =
hostname === 'spectrum.chat' || hostname === 'alpha.spectrum.chat';
const IS_LOCALHOST = hostname === 'localhost';
const IS_HTTP = protocol === 'https:' || protocol === 'http:';
// Make sure the passed redirect URL is a spectrum.chat one or (in development) localhost
Expand Down