From b03718c7f8af048bdaf1253f54eaf7de2b309611 Mon Sep 17 00:00:00 2001 From: George Stagas Date: Fri, 13 Dec 2013 13:00:05 -0800 Subject: [PATCH 1/2] add Makefile rule to test port 80 --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 From f01458cfd0d688bd0bda57f86929664287cdfcc5 Mon Sep 17 00:00:00 2001 From: George Stagas Date: Fri, 13 Dec 2013 13:01:02 -0800 Subject: [PATCH 2/2] fix `.isCrossDomain()` for port 80 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; };