repod/lib/Controller/PageController.php
Michel Roux 8ee01ed80f
All checks were successful
repod / xml (push) Successful in 13s
repod / php (push) Successful in 39s
repod / nodejs (push) Successful in 1m20s
repod / release (push) Has been skipped
revert: back to main to be consistent
2024-05-29 23:47:20 +02:00

32 lines
676 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, 'main');
$response->setContentSecurityPolicy($csp);
return $response;
}
}