MCPcopy Create free account
hub / github.com/ampproject/amphtml / getProxyServingType

Function getProxyServingType

src/url.js:409–416  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

407 * @return {?string}
408 */
409export function getProxyServingType(url) {
410 url = urlAsLocation(url);
411 if (!isProxyOrigin(url)) {
412 return null;
413 }
414 const path = url.pathname.split('/', 2);
415 return path[1];
416}
417
418/**
419 * Returns whether the URL has valid protocol.

Callers 2

test-url.jsFile · 0.90
getReplaceParamsFunction · 0.90

Calls 2

urlAsLocationFunction · 0.85
isProxyOriginFunction · 0.85

Tested by

no test coverage detected