diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2022-04-26 19:25:22 +0300 |
---|---|---|
committer | Anna Larch <anna@nextcloud.com> | 2022-04-28 19:05:31 +0300 |
commit | 738dde801849b1271870a846bcf5dde35dc7034b (patch) | |
tree | e184d2161170de843f6c1c7d6afd982110368ec4 /lib/Controller | |
parent | 27fe2975aac226aad344d7a54b0858d136565d91 (diff) |
Disable scheduled sending if ajax cron is used
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'lib/Controller')
-rw-r--r-- | lib/Controller/PageController.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 332a91bca..4a02c246c 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -181,6 +181,13 @@ class PageController extends Controller { $this->outboxService->getMessages($user->getUID()) ); + // Disable scheduled send in frontend if ajax cron is used because it is unreliable + $cronMode = $this->config->getAppValue('core', 'backgroundjobs_mode', 'ajax'); + $this->initialStateService->provideInitialState( + 'disable-scheduled-send', + $cronMode === 'ajax', + ); + $csp = new ContentSecurityPolicy(); $csp->addAllowedFrameDomain('\'self\''); $response->setContentSecurityPolicy($csp); |