Allow configurable base filename for selfhosted to support adblock proxy
Opened this issue · 0 comments
semanticfire commented
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:
Line 48 in 4bf56f1
stats
instead of plausible
, it would be nice to have this configurable.