MCPcopy Index your code
hub / github.com/ampproject/amphtml / isSecureUrlDeprecated

Function isSecureUrlDeprecated

src/url.js:290–298  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

288 * @return {boolean}
289 */
290export function isSecureUrlDeprecated(url) {
291 url = urlAsLocation(url);
292 return (
293 url.protocol == 'https:' ||
294 url.hostname == 'localhost' ||
295 url.hostname == '127.0.0.1' ||
296 endsWith(url.hostname, '.localhost')
297 );
298}
299
300/**
301 * Asserts that a given url is HTTPS or protocol relative. It's a user-level

Callers 5

test-url.jsFile · 0.90
isSecureMethod · 0.90
getAmpAdMetadataFunction · 0.90
assertHttpsUrlFunction · 0.85

Calls 2

endsWithFunction · 0.90
urlAsLocationFunction · 0.85

Tested by

no test coverage detected