other: do not block sw

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/953/head
Varun Patil 2023-11-25 10:57:03 -08:00
parent 5c4a1342e4
commit eaba80a73b
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ class OtherController extends GenericApiController
switch ($name) {
case 'service-worker.js':
// Disable service worker if server is in debug mode
if (\OC::$server->get(\OCP\IConfig::class)->getSystemValue('debug', false)) {
if (!\OC::$server->get(\OCP\IConfig::class)->getSystemValue('memories.sw.enabled', true)) {
throw Exceptions::NotFound('Service worker is disabled in debug mode');
}