Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

When location of tracking script is changed in config the static test page cannot find the divolte.js script #168

Open
krisgeus opened this issue Jun 28, 2017 · 5 comments
Assignees
Labels

Comments

@krisgeus
Copy link
Contributor

No description provided.

@krisgeus krisgeus added the bug label Jun 28, 2017
@krisgeus krisgeus self-assigned this Jun 28, 2017
@DaveSlinn
Copy link
Contributor

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 (

return new TrackingJavaScriptResource("divolte.js",
) back, will that break what PR 137 was fixing?

@friso
Copy link
Collaborator

friso commented Dec 24, 2019

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.

@friso
Copy link
Collaborator

friso commented Dec 24, 2019

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.

@DaveSlinn
Copy link
Contributor

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.

@friso
Copy link
Collaborator

friso commented Dec 28, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants