visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

Made the sameOrigin call work consistently in IE11. #512

Open ForBalah opened 5 years ago

ForBalah commented 5 years ago

I found that in Internet Explorer 11 (this is for a corporate client still on Windows 7), when the host name does not include the port number, (e.g. http://internal.test.com/), then the anchor tag returned by _toURL() call had a different port number ("80") to the port number from window.location (""). As such, the sameOrigin() call was returning false, resulting in routing not being captured.

This was occurring in both http and https sites that did not explicitly include the port number in the url.

I tested this fix in Chrome and Firefox on Windows and it still works there.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.4%) to 93.277% when pulling afbec8353e4d1719c6921c524fa0cd1ac9c8add3 on ForBalah:fix-ie11-sameorigin into 02c026ca82f9d3f5018038d822592e77c040cfb7 on visionmedia:master.