* 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)
| 18400 | * @returns {boolean} Whether the request is for the same origin as the application document. |
| 18401 | */ |
| 18402 | function urlIsSameOrigin(requestUrl) { |
| 18403 | var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl; |
| 18404 | return (parsed.protocol === originUrl.protocol && |
| 18405 | parsed.host === originUrl.host); |
| 18406 | } |
| 18407 | |
| 18408 | /** |
| 18409 | * @ngdoc service |
no test coverage detected