Вопрос

We have a Webapp available for cloud (AppEngine) and inhouse deployment.

For push notfications we are using websockets in inhouse deployments and pubnub on AppEngine (because Google channels were nor reliable enough for us).

We have a simple JavaScript module that abstracts the difference between both both communication architectures at runtime (based on server supplied configuration information).

We use requirejs and uglifyjs2 to combine all JavaScript components into a single file for production use (while we use the original files for debugging).

Our problem now is, that the pubnub JavaScript module tries to contact it's server as soon as it is included (ie before it is called by our software). This of course is not desirable inhouse (causing firewall log entries ...).

The only solution we found so far is to modify pubnub.js to put some of it's code into a module initialization function, that we only call when we know that pubnub is really needed. But this of course means that we have to understand (and manually modify) each new version of pubnub.js.

Is there an alternative?

Это было полезно?

Решение

We'll add an option to disable this for you in our 3.6.3 release. Favorite the PubNub Github JS repo, and you'll be automatically alerted when the 3.6.3 version is released.

geremy

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top