MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / urlIsSameOrigin

Function urlIsSameOrigin

code/songhop/www/lib/angular/angular.js:16315–16319  ·  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

16313 * @returns {boolean} Whether the request is for the same origin as the application document.
16314 */
16315function urlIsSameOrigin(requestUrl) {
16316 var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;
16317 return (parsed.protocol === originUrl.protocol &&
16318 parsed.host === originUrl.host);
16319}
16320
16321/**
16322 * @ngdoc service

Callers 2

sendReqFunction · 0.70
matchUrlFunction · 0.70

Calls 2

isStringFunction · 0.70
urlResolveFunction · 0.70

Tested by

no test coverage detected