plausible-tracker icon indicating copy to clipboard operation
plausible-tracker copied to clipboard

Add ability to customize localhost url

Open madebyfabian opened this issue 1 year ago • 1 comments

I am running localhost from a custom host (https://myapp.local). The way the localhost detection is currently implemented, the tracker does not recognize if I am on localhost or not, and therefore sends the request.

https://github.com/plausible/plausible-tracker/blob/294405cafc934ee666c1a295a5b2fd8737993ce2/src/lib/request.ts#L40-L43

Possible Implementation

I would suggest to add an option where a user can change their localhost url and therefore making isLocalhost true. Happy to add a PR if you agree.

madebyfabian avatar Jan 31 '24 10:01 madebyfabian