Update multi_domain_helpers.rb

use http reffer first. for the api.