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

Function urlIsSameOriginAsBaseUrl

lib/test/angular/1.7.0/angular.js:21051–21053  ·  view source on GitHub ↗

* Parse a request URL and determine whether it is same-origin as the current document base URL. * * Note: The base URL is usually the same as the document location (`location.href`) but can * be overriden by using the ` ` tag. * * @param {string|object} requestUrl The url of the request as

(requestUrl)

Source from the content-addressed store, hash-verified

21049 * @returns {boolean} Whether the URL is same-origin as the document base URL.
21050 */
21051function urlIsSameOriginAsBaseUrl(requestUrl) {
21052 return urlsAreSameOrigin(requestUrl, getBaseUrl());
21053}
21054
21055/**
21056 * Create a function that can check a URL's origin against a list of allowed/whitelisted origins.

Callers 1

matchUrlFunction · 0.70

Calls 2

urlsAreSameOriginFunction · 0.70
getBaseUrlFunction · 0.70

Tested by

no test coverage detected