source: imaps-frontend/node_modules/axios/lib/helpers/isURLSameOrigin.js@ 0c6b92a

main
Last change on this file since 0c6b92a was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago

Pred finalna verzija

  • Property mode set to 100644
File size: 420 bytes
Line 
1import platform from '../platform/index.js';
2
3export default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
4 url = new URL(url, platform.origin);
5
6 return (
7 origin.protocol === url.protocol &&
8 origin.host === url.host &&
9 (isMSIE || origin.port === url.port)
10 );
11})(
12 new URL(platform.origin),
13 platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
14) : () => true;
Note: See TracBrowser for help on using the repository browser.