* 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)
| 21835 | * @returns {boolean} Whether the URL is same-origin as the document base URL. |
| 21836 | */ |
| 21837 | function urlIsSameOriginAsBaseUrl(requestUrl) { |
| 21838 | return urlsAreSameOrigin(requestUrl, getBaseUrl()); |
| 21839 | } |
| 21840 | |
| 21841 | /** |
| 21842 | * Create a function that can check a URL's origin against a list of allowed/whitelisted origins. |
no test coverage detected