MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / urlIsSameOrigin

Function urlIsSameOrigin

web/static/bower_components/angular/angular.js:17989–17993  ·  view source on GitHub ↗

* Parse a request URL and determine whether this is a same-origin request as the application document. * * @param {string|object} requestUrl The url of the request as a string that will be resolved * or a parsed URL object. * @returns {boolean} Whether the request is for the same origin as the a

(requestUrl)

Source from the content-addressed store, hash-verified

17987 * @returns {boolean} Whether the request is for the same origin as the application document.
17988 */
17989function urlIsSameOrigin(requestUrl) {
17990 var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;
17991 return (parsed.protocol === originUrl.protocol &&
17992 parsed.host === originUrl.host);
17993}
17994
17995/**
17996 * @ngdoc service

Callers 2

sendReqFunction · 0.85
matchUrlFunction · 0.85

Calls 2

isStringFunction · 0.85
urlResolveFunction · 0.85

Tested by

no test coverage detected