diff --git a/Makefile b/Makefile index 7be3a35..ec94d17 100644 --- a/Makefile +++ b/Makefile @@ -11,4 +11,7 @@ clean: test: serve . -.PHONY: clean test +test-http: + serve -p 80 . + +.PHONY: clean test test-http diff --git a/index.js b/index.js index 1f2894a..7632ff1 100644 --- a/index.js +++ b/index.js @@ -58,7 +58,7 @@ exports.isRelative = function(url){ exports.isCrossDomain = function(url){ url = exports.parse(url); return url.hostname !== location.hostname - || url.port !== location.port + || url.port !== (location.port || 80) || url.protocol !== location.protocol; };