Adds fix for same_origin check where \'good_refer\' has port set to None due to the fact that the HTTP_REFERER usually do not have port set