diff --git a/lib/Listener/BeforeTemplateRenderedListener.php b/lib/Listener/BeforeTemplateRenderedListener.php index ca20eb9d7a..2df36907b2 100644 --- a/lib/Listener/BeforeTemplateRenderedListener.php +++ b/lib/Listener/BeforeTemplateRenderedListener.php @@ -7,6 +7,7 @@ */ namespace OCA\Richdocuments\Listener; +use OCA\Richdocuments\AppInfo\Application; use OCA\Richdocuments\Service\CapabilitiesService; use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; use OCP\EventDispatcher\Event; @@ -24,7 +25,7 @@ public function handle(Event $event): void { return; } - if ($this->capabilitiesService->hasWASMSupport()) { + if ($this->capabilitiesService->hasWASMSupport() && $event->getResponse()->getApp() === Application::APPNAME) { $event->getResponse()->addHeader('Cross-Origin-Opener-Policy', 'same-origin'); $event->getResponse()->addHeader('Cross-Origin-Embedder-Policy', 'require-corp'); }