Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configurable base filename for selfhosted to support adblock proxy #228

Open
semanticfire opened this issue Oct 21, 2024 · 0 comments

Comments

@semanticfire
Copy link

Even the name plausible in the js script is enough to make adblockers (uBlock) block the script
So even if you use the proxy setup on your local site, it still blocks.
Once you change the file name and let the proxy map do the reverse translation for you, it works like a charm.

location ~ /js/stats.(?<target>(.*?)).js {
        proxy_pass https://stats.example.com/js/plausible.$target.js?ver=2.1.4;
        proxy_set_header Host stats.example.com;
 }

What I did was change:

$file_name = 'plausible';
to contain stats instead of plausible, it would be nice to have this configurable.

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

No branches or pull requests

1 participant