diff --git a/README.md b/README.md index 4521b81..59ddeae 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,7 @@ Below is the complete list of parameters that can be set using environment varia - **JWT_SECRET**: Defines the secret key to validate the JSON Web Token in the request to the ONLYOFFICE Document Server. Defaults to `secret`. - **JWT_HEADER**: Defines the http header that will be used to send the JSON Web Token. Defaults to `Authorization`. - **JWT_IN_BODY**: Specifies the enabling the token validation in the request body to the ONLYOFFICE Document Server. Defaults to `false`. +- **WOPI_ENABLED**: Specifies the enabling the wopi handlers. Defaults to `false`. - **USE_UNAUTHORIZED_STORAGE**: Set to `true`if using selfsigned certificates for your storage server e.g. Nextcloud. Defaults to `false` - **GENERATE_FONTS**: When 'true' regenerates fonts list and the fonts thumbnails etc. at each start. Defaults to `true` - **METRICS_ENABLED**: Specifies the enabling StatsD for ONLYOFFICE Document Server. Defaults to `false`. diff --git a/run-document-server.sh b/run-document-server.sh index 3b8800f..2bcdcc2 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -71,6 +71,8 @@ JWT_SECRET=${JWT_SECRET:-secret} JWT_HEADER=${JWT_HEADER:-Authorization} JWT_IN_BODY=${JWT_IN_BODY:-false} +WOPI_ENABLED=${WOPI_ENABLED:-false} + GENERATE_FONTS=${GENERATE_FONTS:-true} if [[ ${PRODUCT_NAME} == "documentserver" ]]; then @@ -313,6 +315,11 @@ update_ds_settings(){ ${JSON} -I -e "if(this.services.CoAuthoring.requestDefaults===undefined)this.services.CoAuthoring.requestDefaults={}" ${JSON} -I -e "if(this.services.CoAuthoring.requestDefaults.rejectUnauthorized===undefined)this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false" fi + + if [ "${WOPI_ENABLED}" == "true" ]; then + ${JSON} -I -e "if(this.wopi===undefined)this.wopi={}" + ${JSON} -I -e "this.wopi.enable = true" + fi } create_postgresql_cluster(){