* 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)
| 21049 | * @returns {boolean} Whether the URL is same-origin as the document base URL. |
| 21050 | */ |
| 21051 | function 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. |
no test coverage detected