32 lines
677 B
PHP
32 lines
677 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace OCA\RePod\Controller;
|
|
|
|
use OCA\RePod\AppInfo\Application;
|
|
use OCP\AppFramework\Controller;
|
|
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
|
use OCP\AppFramework\Http\TemplateResponse;
|
|
use OCP\Util;
|
|
|
|
class PageController extends Controller
|
|
{
|
|
/**
|
|
* @NoAdminRequired
|
|
* @NoCSRFRequired
|
|
*/
|
|
public function index(): TemplateResponse {
|
|
Util::addScript(Application::APP_ID, 'main');
|
|
|
|
$csp = new ContentSecurityPolicy();
|
|
$csp->addAllowedImageDomain('*');
|
|
$csp->addAllowedMediaDomain('*');
|
|
|
|
$response = new TemplateResponse(Application::APP_ID, 'index');
|
|
$response->setContentSecurityPolicy($csp);
|
|
|
|
return $response;
|
|
}
|
|
}
|