Yes, you can use your own custom domain (pubsub.mydomain.com instead of pubsub.pubnub.com). To do so, setup your DNS records accordingly, i.e. CNAME pubsub.pubnub.com and then use that CNAME as the origin="pubsub.mydomain.com".

However, this does not work with TLS connections and you will receive a certificate validation error trying to use a custom origin other than a PubNub sub-domain.