mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Nextcloud allow in iframe #537
This commit is contained in:
parent
0d715c0bb4
commit
e3d2250e19
2 changed files with 13 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
{
|
||||
const
|
||||
NAME = 'Nextcloud',
|
||||
VERSION = '2.19',
|
||||
VERSION = '2.20',
|
||||
RELEASE = '2023-02-22',
|
||||
CATEGORY = 'Integrations',
|
||||
DESCRIPTION = 'Integrate with Nextcloud v20+',
|
||||
|
|
@ -33,6 +33,17 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
|
||||
$this->addTemplate('templates/PopupsNextcloudFiles.html');
|
||||
$this->addTemplate('templates/PopupsNextcloudCalendars.html');
|
||||
|
||||
} else {
|
||||
// \OC::$server->getConfig()->getAppValue('snappymail', 'snappymail-no-embed');
|
||||
$this->addHook('main.content-security-policy', 'ContentSecurityPolicy');
|
||||
}
|
||||
}
|
||||
|
||||
public function ContentSecurityPolicy(\SnappyMail\HTTP\CSP $CSP)
|
||||
{
|
||||
if (\method_exists($CSP, 'add')) {
|
||||
$CSP->add('frame-ancestors', "'self'");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue