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

Add ability to customize localhost url #62

Open
madebyfabian opened this issue Jan 31, 2024 · 0 comments
Open

Add ability to customize localhost url #62

madebyfabian opened this issue Jan 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@madebyfabian
Copy link

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.

const isLocalhost =
/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*:)*?:?0*1$/.test(
location.hostname
) || location.protocol === 'file:';

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.

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

No branches or pull requests

1 participant