vue-hackernews-2.0
vue-hackernews-2.0 copied to clipboard
enable service worker on localhost
We want to debug service worker on localhost. More details in this issue #268
What about IPv6?
const isLocalhost = Boolean(
location.hostname === 'localhost' ||
location.hostname === '[::1]' ||
location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)
)
edited: extra space