folder-share: use public template (fix #192)

pull/221/head
Varun Patil 2022-11-13 18:28:43 -08:00
parent 36c777bc12
commit 139136d3c0
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ use OCA\Files\Event\LoadSidebar;
use OCP\App\IAppManager; use OCP\App\IAppManager;
use OCP\AppFramework\AuthPublicShareController; use OCP\AppFramework\AuthPublicShareController;
use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\Template\PublicTemplateResponse;
use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState; use OCP\AppFramework\Services\IInitialState;
use OCP\EventDispatcher\IEventDispatcher; use OCP\EventDispatcher\IEventDispatcher;
@ -121,7 +122,7 @@ class PublicController extends AuthPublicShareController
$policy->addAllowedConnectDomain('nominatim.openstreetmap.org'); $policy->addAllowedConnectDomain('nominatim.openstreetmap.org');
$policy->addAllowedFrameDomain('www.openstreetmap.org'); $policy->addAllowedFrameDomain('www.openstreetmap.org');
$response = new TemplateResponse($this->appName, 'main'); $response = new PublicTemplateResponse($this->appName, 'main');
$response->setContentSecurityPolicy($policy); $response->setContentSecurityPolicy($policy);
return $response; return $response;