1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-01-22 18:52:10 +01:00

Allow iframes

This commit is contained in:
Lukas Reschke 2015-07-22 21:21:59 +02:00
parent 1b0433b329
commit 9f76edb555

View File

@ -12,6 +12,7 @@
namespace OCA\Bookmarks\Controller;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use \OCP\IRequest;
use \OCP\AppFramework\Http\TemplateResponse;
use \OCP\AppFramework\Controller;
@ -38,7 +39,13 @@ class WebViewController extends Controller {
public function index() {
$bookmarkleturl = $this->urlgenerator->getAbsoluteURL('index.php/apps/bookmarks/bookmarklet');
$params = array('user' => $this->userId, 'bookmarkleturl' => $bookmarkleturl);
return new TemplateResponse('bookmarks', 'main', $params);
$policy = new ContentSecurityPolicy();
$policy->addAllowedFrameDomain("'self'");
$response = new TemplateResponse('bookmarks', 'main', $params);
$response->setContentSecurityPolicy($policy);
return $response;
}
/**