open20/amos-onlyoffice

There is no license information available for the latest version (dev-master) of this package.

Amos OnlyOffice

dev-master 2023-02-14 15:25 UTC

README

Interfacciamento con OnlyOffice per la modifica dei documenti

Installation

Add module to your main config in backend:

<?php
'modules' => [
    'onlyoffice' => [
        'class' => '\open20\onlyoffice\Module',
        'docServSiteUrl' => '[URL del server che fornisce i servizi di OnlyOffice]',
        'docServJwtSecret' => '[chiave JWT fornita dal server]',
        'keyFilePrefixName' => '[prefisso per gli identificativi univoci dei file]'
    ],
],

Add OnlyOffice migrations path to console modules (console/config/migrations.php):

    '@vendor/open20/amos-onlyoffice/src/migrations'

Add the domian of OnlyOffice API server on "script-src" and "frame-src" white list:

'response' => [
    'class' => 'elitedivision\amos\core\response\Response',
    'cspDirectives' => [
        'default-src' => "'self' 'unsafe-inline'",
        'connect-src' => "'self' 'unsafe-inline'",
        'img-src' => "'self' 'unsafe-inline'",
        'script-src' => "'self' 'unsafe-inline' 'unsafe-eval' [server domain]",
        'style-src' => "'self' 'unsafe-inline'",
        'frame-src' => "'self' 'unsafe-inline' [server domain]",
    ],
    'frameLevel' => 1,
    'frameAllowFrom' => 'https://www.youtube.com/',
],

Add the module in bootstrap

$bootstrap[] = 'onlyoffice';

Params

docServSiteUrl (string): URL del server che fornisce i servizi di OnlyOffice.

docServJwtSecret (string): chiave JWT fornita dal server.