![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/app/bundles/NotificationBundle/Controller/ |
<?php namespace Mautic\NotificationBundle\Controller; use Mautic\CoreBundle\Controller\CommonController; use Symfony\Component\HttpFoundation\Response; class JsController extends CommonController { /** * We can't user JsonResponse here, because * it improperly encodes the data array. */ public function manifestAction(): Response { $gcmSenderId = $this->coreParametersHelper->get('gcm_sender_id', '446150739532'); $data = [ 'start_url' => '/', 'gcm_sender_id' => $gcmSenderId, 'gcm_user_visible_only' => true, ]; return new Response( json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES), 200, [ 'Content-Type' => 'application/json', ] ); } public function workerAction(): Response { return new Response( "importScripts('https://cdn.onesignal.com/sdks/OneSignalSDK.js');", 200, [ 'Service-Worker-Allowed' => '/', 'Content-Type' => 'application/javascript', ] ); } public function updaterAction(): Response { return new Response( "importScripts('https://cdn.onesignal.com/sdks/OneSignalSDK.js');", 200, [ 'Service-Worker-Allowed' => '/', 'Content-Type' => 'application/javascript', ] ); } }