Skip to content

Commit d8eae7f

Browse files
committed
fix: IE11 log in works for ports 80 and 443
Fixes logging in with IE11 when using well-known port numbers 80 and 443 where otherwise isSameOrigin() fails because of an IE bug. See issue angular-fullstack#1880
1 parent eb95b33 commit d8eae7f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: templates/app/client/components/util/util.service.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ function UtilService($window) {
4949
origins.push($window.location);
5050
origins = origins.filter(function(o) {
5151
return url.hostname === o.hostname &&
52-
url.port === o.port &&
52+
// 2nd part of the special treatment for IE fix (see above):
53+
// This part is when using well-known ports 80 or 443 with IE, when $window.location.port==='' instead of the real port number. Probably the same cause as this IE bug:
54+
// https://connect.microsoft.com/IE/feedback/details/817343/ie11-scripting-value-of-htmlanchorelement-host-differs-between-script-created-link-and-link-from-document
55+
(url.port === o.port || (o.port === '' && (url.port === '80' || url.port === '443'))) &&
5356
url.protocol === o.protocol;
5457
});
5558
return (origins.length >= 1);

0 commit comments

Comments
 (0)