Protocol logic and lint fixes.

This commit is contained in:
orangemug 2019-10-27 17:15:17 +00:00
parent 566201fb45
commit f39fb34f36

View file

@ -32,12 +32,12 @@ class UrlInput extends React.Component {
const protocol = getProtocol(url); const protocol = getProtocol(url);
if ( if (
protocol && protocol &&
protocol === "https:" && protocol === "http:" &&
window.location.protocol !== "http:" window.location.protocol === "https:"
) { ) {
error = ( error = (
<SmallError> <SmallError>
CORs policy won't allow fetching resources served over http from https, use a <code>https://</code> domain CORs policy won&apos;t allow fetching resources served over http from https, use a <code>https://</code> domain
</SmallError> </SmallError>
); );
} }