* 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)
| 20679 | * @returns {boolean} Whether the request is for the same origin as the application document. |
| 20680 | */ |
| 20681 | function urlIsSameOrigin(requestUrl) { |
| 20682 | var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl; |
| 20683 | return (parsed.protocol === originUrl.protocol && |
| 20684 | parsed.host === originUrl.host); |
| 20685 | } |
| 20686 | |
| 20687 | /** |
| 20688 | * @ngdoc service |
no test coverage detected