Skip to content

Commit

Permalink
disable service worker on previews
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Aug 9, 2022
1 parent a6d79f8 commit 700090a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions www/src/serviceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// ignore on preview branches
window.location.hostname.endsWith('web.app') ||
// 127.0.0.1/8 is considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
Expand Down

0 comments on commit 700090a

Please sign in to comment.