mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 13:31:44 +08:00
656d0fa762
Currently, we check if the site is loaded over `https` before registering the service worker. This prevents the service worker from being registered in a standard dev/test setup. This change replaces the protocol check with `isSecureContext` property check. In addition to resources delivered over `https`, `isSecureContext` returns `true` for resources loaded over `http://127.0.0.1`, `http://localhost`, `http://*.localhost` and `file://`. |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
helpers | ||
jobs | ||
mailers | ||
models | ||
serializers | ||
services | ||
views |