mirror of
https://git.crystalyx.net/Xefir/repod.git
synced 2024-12-26 16:55:13 +01:00
32 lines
676 B
PHP
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;
|
|
}
|
|
}
|