Open mannp opened 4 years ago
@mannp Using the customDomain
option should be all you need. Let me know if I'm missing something.
@ccummings the customDomain creates a url with /js/index.js rather than /js/plausible.js when using it selfhosted.
I use a patched local copy of the plugin for my domain and I get to keep it updated with dependency updates....
I modified var scriptURI in gatsby-ssr.js to select my domain or plausible and it works, but not sure its any good for others.
This would be very useful! :)
For @mannp and others, a simpler workaround that doesnt involve any patching is to put the entire path in the custom domain and end with a query string, forcing the request to the correct file:
https://github.com/Weetbix/crossplayable.games/blob/main/gatsby-config.ts#L19
For @mannp and others, a simpler workaround that doesnt involve any patching is to put the entire path in the custom domain and end with a query string, forcing the request to the correct file:
https://github.com/Weetbix/crossplayable.games/blob/main/gatsby-config.ts#L19
Thanks @Weetbix I am good keeping my local version updated, with my website updates, but it certainly could help others.
Thanks, @Weetbix for the workaround.
@Weetbix That's really a clever work-around, thanks.
But for me, I chose to make some work-around on the server's side. I use Caddy for reverse proxy, so I just add one extra line to make things all right:
plausible.example.com {
rewrite /js/index.js /js/plausible.js
}
Hi there
Would it be possible for a tweak to add support for self hosted plausible instances please?
Perhaps another option selfhostedDomain:
plausible.mydomain.com
or selfhosted: true and use the customDomain still...?allowing the creation of a url as follows;