MCPcopy Create free account
hub / github.com/decaporg/decap-cms / isInsecureProtocol

Function isInsecureProtocol

packages/decap-cms-lib-auth/src/utils.js:14–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12}
13
14export function isInsecureProtocol() {
15 return (
16 document.location.protocol !== 'https:' &&
17 // TODO: Is insecure localhost a bad idea as well? I don't think it is, since you are not actually
18 // sending the token over the internet in this case, assuming the auth URL is secure.
19 document.location.hostname !== 'localhost' &&
20 document.location.hostname !== '127.0.0.1'
21 );
22}

Callers 2

authenticateMethod · 0.90
authenticateMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected