With PubNub Functions, it will be possible to restrict subscriber access by IP address or referrer URL. But currently, Functions only supports publish event handlers (subscribe event handlers will be available as a future feature).
Today, restricting access to subscribers by IP or URL is not strictly necessary to provide full security. The primary technique for restricting access to subscribers is accomplished using PubNub Access Manager.
See also: