-
Notifications
You must be signed in to change notification settings - Fork 77
When location of tracking script is changed in config the static test page cannot find the divolte.js script #168
Comments
I know this is a really old issue, but it is still open. We are encountering the same issue. We are overriding the javascript name and when we his the test page, it is still looking for divolte.js. I found an old PR #137 that seems to change the code from using the configured script to a hard coded string of "divolte.js". Is this the reason? If I open a PR and change this line ( divolte-collector/src/main/java/io/divolte/server/js/TrackingJavaScriptResource.java Line 80 in e6b7269
|
I am not sure that is related. As far as I know the test page is a static resource and is just served as is. It is not dynamically generated and as a result does not support any other name than the hardcoded one. To the best of my recollection we decided not to change that, because the test page was built mostly for the purpose of supporting the tutorial and not so much a production use case. If you are deploying Divolte behind a L7 load balancer of some sort, a possible workaround is to add a static test page to the load balancer config that includes the correct script. |
See here. Also note that the page includes a CDN-ed Bootstrap which may not be ideal to host, since it never sees an upgrade. |
Are you saying that the collector we deployed to production should not have that test page? How would I remove it, without altering the source code and building a new container? Our current container is based off divolte/divolte-collector:latest on docker hub, that we add our own config to. Personally, I find that test page is very handy to make sure I have all the proper ingress routing correctly to reach my collector pods, and that the signal callbacks are properly reaching kafka. We just encountered this issue because we have changed the name of the script to prevent ad-blocking software from blocking it, which uBlock Origin was doing. I can still reach the test page, but because the script name changed, the callback signals are not working. I will look at building my own host test page to work with, but I would vote to keep the test page available, but have it use the actual collector js file, if renamed. |
The test page isn't necessarily harmful, but yeah, I wouldn't leave it exposed per se, as it might accidentally get indexed into search engines or something like that. You can disable serving the static page through a configuration option. |
No description provided.
The text was updated successfully, but these errors were encountered: