fix: replace hardcoded 127.0.0.1 by window.location.hostname