MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / urlIsSameOrigin

Function urlIsSameOrigin

lib/test/angular/1.5.0/angular.js:18878–18882  ·  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

18876 * @returns {boolean} Whether the request is for the same origin as the application document.
18877 */
18878function urlIsSameOrigin(requestUrl) {
18879 var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;
18880 return (parsed.protocol === originUrl.protocol &&
18881 parsed.host === originUrl.host);
18882}
18883
18884/**
18885 * @ngdoc service

Callers 2

sendReqFunction · 0.70
matchUrlFunction · 0.70

Calls 2

isStringFunction · 0.70
urlResolveFunction · 0.70

Tested by

no test coverage detected