配置 ONLYOFFICE 文档企业版
简介
若要更改任何ONLYOFFICE文档服务器设置,请在ONLYOFFICE文档配置文件中配置相应参数,该文件位于以下路径:
- 对于 Linux -
/etc/onlyoffice/documentserver/default.json - 对于 Windows -
%ProgramFiles%\ONLYOFFICE\DocumentServer\config\default.json
如果您想更改它,可以使用local.json文件,所有已编辑的参数都应存储在其中。此文件位于与default.json文件相同的目录中,并且必须保留必要参数的完整对象结构。
default.json文件的内容。每次重启Docker容器或将ONLYOFFICE文档升级到新版本时,默认值都会恢复,您的所有更改将丢失。下文描述了默认服务器设置。
管理控制台
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
adminPanel.port | 定义管理控制台服务运行所在的端口。 | 整数 | 9000 |
adminPanel.passwordHash | 定义用于通过PBKDF2-SHA256算法保护密码的密码哈希值。
此参数的值存储在runtime.json文件中。例如,对于Linux版本,该文件位于: /var/www/onlyoffice/Data/runtime.json | 字符串 | "" |
这些参数定义了管理控制台的属性。有关使用管理控制台的更多详情,请参阅此文。
示例
"adminPanel": {
"port": 9000
}
StatsD
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
statsd.useMetrics | 定义是否为ONLYOFFICE文档启用StatsD指标。 | 布尔值 | false |
statsd.host | 定义StatsD服务器主机(主机名或IP地址)。 | 字符串 | "localhost" |
statsd.port | 定义StatsD服务器端口。 | 字符串 | "8125" |
statsd.prefix | 定义一个将自动添加到所有统计信息开头的字符串。它有助于区分使用同一StatsD服务器的不同应用程序。 | 字符串 | "ds." |
这些参数定义了StatsD服务器的属性,指定了一个指标聚合器。
示例
"statsd": {
"useMetrics": false,
"host": "localhost",
"port": "8125",
"prefix": "ds."
}
AI插件设置
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
aiSettings.actions | 定义AI执行的操作,例如聊天、总结、翻译、文本分析、图像生成、OCR、视觉识别。 | 对象 | |
aiSettings.models | 定义AI模型,例如gemini-1.5-pro-latest,llama3.2:latest等。 | 数组 | [] |
aiSettings.providers | 定义AI提供商,例如OpenAI,Google Gemini,Anthropic等。 | 对象 | |
aiSettings.version | 定义AI SDK的版本。 | 整数 | 3 |
aiSettings.timeout | 定义AI代理超时时间(以分钟为单位)。 | 字符串 | "5m" |
aiSettings.allowedCorsOrigins | 定义允许哪些外部网站向服务器发出跨域请求。 | 字符串数组 | ["https://onlyoffice.github.io", "https://onlyoffice-plugins.github.io"] |
aiSettings.proxy | 支持通过代理路由AI请求。 | 字符串 | "" |
这些参数定义了AI插件的属性。
示例
"aiSettings": {
"actions": {},
"models": [],
"providers": {},
"version": 3,
"timeout": "5m",
"allowedCorsOrigins": ["https://onlyoffice.github.io", "https://onlyoffice-plugins.github.io"],
"proxy": ""
}
日志记录器
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
log.filePath | 定义日志文件的路径。 | 字符串 | "" |
log.options | 定义日志选项。 | 对象 | |
log.options.replaceConsole | 定义是否将日志信息打印到控制台。 | 布尔值 | true |
这些参数定义了日志记录器的属性。
示例
"log": {
"filePath": "",
"options": {
"replaceConsole": true
}
}
运行时配置
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
runtimeConfig.filePath | 定义runtime.json动态配置文件的路径。默认使用/var/www/onlyoffice/Data/runtime.json路径。 | 字符串 | "" |
runtimeConfig.cache | 定义runtime.json的缓存选项。 | 对象 | |
runtimeConfig.cache.stdTTL | 为每个生成的缓存元素定义TTL(生存时间)(以秒为单位)。 | 整数 | 300 |
runtimeConfig.cache.checkperiod | 定义用于自动删除检查间隔的周期(以秒为单位)。 | 整数 | 60 |
runtimeConfig.cache.useClones | 定义是否克隆缓存的变量。如果为true,将创建缓存变量的副本。如果为false,则仅保存引用。 | 布尔值 | false |
这些参数定义了runtime.json动态配置文件的属性。此文件允许您在不重启的情况下更改参数。该文件基于监视事件或每5分钟重新读取一次。
示例
"runtimeConfig": {
"filePath": "",
"cache": {
"stdTTL": 300,
"checkperiod": 60,
"useClones": false
}
}
队列
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
queue.type | 定义消息代理的类型。 | 字符串 | "rabbitmq" |
queue.visibilityTimeout | 定义转换超时时间(以秒为单位)。 | 整数 | 300 |
queue.retentionPeriod | 定义队列中所有消息的TTL(生存时间)(以秒为单位)。 | 整数 | 900 |
这些参数定义了从消息代理接收的消息队列。
示例
"queue": {
"type": "rabbitmq",
"visibilityTimeout": 300,
"retentionPeriod": 900
}
电子邮件
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
email.smtpServerConfiguration | 定义连接到SMTP服务器的基本设置。 | 对象 | |
email.smtpServerConfiguration.host | 定义SMTP服务器的主机名或IP地址。 | 字符串 | "localhost" |
email.smtpServerConfiguration.port | 定义SMTP服务器端口。 | 整数 | 587 |
email.smtpServerConfiguration.auth | 定义认证数据。 | 对象 | |
email.smtpServerConfiguration.auth.user | 定义认证用户名。 请注意,从8.3版本开始,此参数在default.json和local.json文件中的值是不同的。 | 字符串 | "" |
email.smtpServerConfiguration.auth.pass | 定义认证密码。 请注意,从8.3版本开始,此参数在default.json和local.json文件中的值是不同的。 | 字符串 | "" |
email.connectionConfiguration | 定义连接到SMTP服务器的技术选项。 | 对象 | |
email.connectionConfiguration.disableFileAccess | 定义是否允许使用文件作为内容。如果此参数设置为true,则来自不可信源的JSON数据不能用作电子邮件。 如果附件或消息节点尝试从文件获取内容,发送将返回错误。 | 布尔值 | false |
email.connectionConfiguration.disableUrlAccess | 定义是否允许使用URL作为内容。 | 布尔值 | false |
email.contactDefaults | 定义电子邮件消息设置。 | 对象 | |
email.contactDefaults.from | 定义发件人的电子邮件地址。所有电子邮件地址可以是简单的"sender@server.com", 也可以带有格式化的名称'"Sender Name" sender@server.com'。 | 字符串 | "from@example.com" |
email.contactDefaults.to | 定义将出现在收件人:字段上的、以逗号分隔的或数组形式的收件人电子邮件地址列表。 | 字符串 | "to@example.com" |
这些参数定义了用于发送通知的外部邮件服务器的设置。要连接到邮件服务器, 请使用nodemailer库。许多配置设置直接传递给此库。
示例
"email": {
"smtpServerConfiguration": {
"host": "localhost",
"port": 587,
"auth": {
"user": "",
"pass": ""
}
},
"connectionConfiguration": {
"disableFileAccess": false,
"disableUrlAccess": false
},
"contactDefaults": {
"from": "from@example.com",
"to": "to@example.com"
}
}
通知
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
notification.rules | 为四种通知类型定义通知设置规则: licenseExpirationWarning、licenseExpirationError、licenseLimitEdit、licenseLimitLiveViewer。 | 对象 | |
notification.rules.licenseExpirationWarning | 为licenseExpirationWarning通知设置定义规则。 | 对象 | |
notification.rules.licenseExpirationWarning.enable | 定义是否启用licenseExpirationWarning通知。每种通知类型必须单独启用。 | 布尔值 | false |
notification.rules.licenseExpirationWarning.transportType | 定义发送licenseExpirationWarning通知的方式。目前,仅email类型可用。 | 字符串数组 | ["email"] |
notification.rules.licenseExpirationWarning.template | 定义licenseExpirationWarning通知标题和正文的模板。 | 对象 | |
notification.rules.licenseExpirationWarning.template.title | 定义licenseExpirationWarning通知标题的模板。 | 字符串 | "%s Docs license expiration warning" |
notification.rules.licenseExpirationWarning.template.body | 定义licenseExpirationWarning通知正文的模板。 | 字符串 | "Attention! Your license is about to expire on %s.\nUpon reaching this date, you will no longer be entitled to receive personal technical support and install new Docs versions released after this date." |
notification.rules.licenseExpirationWarning.policies | 定义licenseExpirationWarning通知的发送策略。 | 对象 | |
notification.rules.licenseExpirationWarning.policies.repeatInterval | 定义licenseExpirationWarning通知的发送时间(不早于指定周期)。 | 字符串 | "1d" |
notification.rules.licenseExpirationError | 为licenseExpirationError通知设置定义规则。 | 对象 | |
notification.rules.licenseExpirationError.enable | 定义是否启用licenseExpirationError通知。每种通知类型必须单独启用。 | 布尔值 | false |
notification.rules.licenseExpirationError.transportType | 定义发送licenseExpirationError通知的方式。目前,仅email类型可用。 | 字符串数组 | ["email"] |
notification.rules.licenseExpirationError.template | 定义licenseExpirationError通知标题和正文的模板。 | 对象 | |
notification.rules.licenseExpirationError.template.title | 定义licenseExpirationError通知标题的模板。 | 字符串 | "%s Docs license expiration warning" |
notification.rules.licenseExpirationError.template.body | 定义licenseExpirationError通知正文的模板。 | 字符串 | "Attention! Your license expired on %s.\nYou are no longer entitled to receive personal technical support and install new Docs versions released after this date.\nPlease contact sales@onlyoffice.com to discuss license renewal." |
notification.rules.licenseExpirationError.policies | 定义licenseExpirationError通知的发送策略。 | 对象 | |
notification.rules.licenseExpirationError.policies.repeatInterval | 定义licenseExpirationError通知的发送时间(不早于指定周期)。 | 字符串 | "1d" |
notification.rules.licenseLimitEdit | 为licenseLimitEdit通知设置定义规则。 | 对象 | |
notification.rules.licenseLimitEdit.enable | 定义是否启用licenseLimitEdit通知。每种通知类型必须单独启用。 | 布尔值 | false |
notification.rules.licenseLimitEdit.transportType | 定义发送licenseLimitEdit通知的方式。目前,仅email类型可用。 | 字符串数组 | ["email"] |
notification.rules.licenseLimitEdit.template | 定义licenseLimitEdit通知标题和正文的模板。 | 对象 | |
notification.rules.licenseLimitEdit.template.title | 定义licenseLimitEdit通知标题的模板。 | 字符串 | "%s Docs license connection limit warning" |
notification.rules.licenseLimitEdit.template.body | 定义licenseLimitEdit通知正文的模板。 | 字符串 | "Attention! You have reached %s%% of the %s limit set by your license." |
notification.rules.licenseLimitEdit.policies | 定义licenseLimitEdit通知的发送策略。 | 对象 | |
notification.rules.licenseLimitEdit.policies.repeatInterval | 定义licenseLimitEdit通知的发送时间(不早于指定周期)。 | 字符串 | "1d" |
notification.rules.licenseLimitLiveViewer | 为licenseLimitLiveViewer通知设置定义规则。 | 对象 | |
notification.rules.licenseLimitLiveViewer.enable | 定义是否启用licenseLimitLiveViewer通知。每种通知类型必须单独启用。 | 布尔值 | false |
notification.rules.licenseLimitLiveViewer.transportType | 定义发送licenseLimitLiveViewer通知的方式。目前,仅email类型可用。 | 字符串数组 | ["email"] |
notification.rules.licenseLimitLiveViewer.template | 定义licenseLimitLiveViewer通知标题和正文的模板。 | 对象 | |
notification.rules.licenseLimitLiveViewer.template.title | 定义licenseLimitLiveViewer通知标题的模板。 | 字符串 | "%s Docs license connection limit warning" |
notification.rules.licenseLimitLiveViewer.template.body | 定义licenseLimitLiveViewer通知正文的模板。 | 字符串 | "Attention! You have reached %s%% of the %s limit set by your license." |
notification.rules.licenseLimitLiveViewer.policies | 定义licenseLimitLiveViewer通知的发送策略。 | 对象 | |
notification.rules.licenseLimitLiveViewer.policies.repeatInterval | 定义licenseLimitLiveViewer通知的发送时间(不早于指定周期)。 | 字符串 | "1d" |
这些参数定义了通知设置。
将发送具有以下事件类型和内容的通知:
超过连接配额(唯一用户配额)的70%。
许可证连接限制警告:"注意!您已达到许可证设置的连接限制的70%。"
达到连接配额(唯一用户配额)。
许可证连接限制警告:"注意!您已达到许可证设置的连接限制的100%。"
在许可证到期前30天。
许可证到期警告: "注意!您的许可证即将于2024年9月8日到期。 到期后,您将不再有权获得个人技术支持并安装此日期之后发布的新文档版本。"
许可证已过期。
许可证连接限制警告: "注意!您的许可证已于2024年9月8日过期。 您不再有权获得个人技术支持并安装此日期之后发布的新文档版本。 请联系 sales@onlyoffice.com 讨论续订事宜。"
这些通知会以WARN或ERROR级别写入服务器日志。
示例
"notification": {
"rules": {
"licenseExpirationWarning": {
"enable": false,
"transportType": [
"email"
],
"template": {
"title": "%s Docs license expiration warning",
"body": "Attention! Your license is about to expire on %s.\nUpon reaching this date, you will no longer be entitled to receive personal technical support and install new Docs versions released after this date."
},
"policies": {
"repeatInterval": "1d"
}
},
"licenseExpirationError": {
"enable": false,
"transportType": [
"email"
],
"template": {
"title": "%s Docs license expiration warning",
"body": "Attention! Your license expired on %s.\nYou are no longer entitled to receive personal technical support and install new Docs versions released after this date.\nPlease contact sales@onlyoffice.com to discuss license renewal."
},
"policies": {
"repeatInterval": "1d"
}
},
"licenseLimitEdit": {
"enable": false,
"transportType": [
"email"
],
"template": {
"title": "%s Docs license connection limit warning",
"body": "Attention! You have reached %s%% of the %s limit set by your license."
},
"policies": {
"repeatInterval": "1h"
}
},
"licenseLimitLiveViewer": {
"enable": false,
"transportType": [
"email"
],
"template": {
"title": "%s Docs license connection limit warning",
"body": "Attention! You have reached %s%% of the live viewer %s limit set by your license."
},
"policies": {
"repeatInterval": "1h"
}
}
}
}
文档存储服务
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
storage.name | 定义文档存储服务的名称。例如,“storage-s3”值允许将Amazon S3存储桶连接为缓存。“storage-az”值允许将MS Azure Blob存储连接为缓存。 | 字符串 | "storage-fs" |
storage.fs | 定义文件系统对象参数。 | 对象 | |
storage.fs.folderPath | 定义存储所有文件的App_Data文件夹的路径。 | 字符串 | "" |
storage.fs.urlExpires | 定义指向文件系统对象的临时URL过期时间(以秒为单位)。 | 整数 | 900 |
storage.fs.secretString | 定义用于对URL进行签名的密钥字符串。 | 字符串 | "verysecretstring" |
storage.region | 定义您Amazon存储桶所在的AWS区域。 | 字符串 | "" |
storage.endpoint | 定义S3 AWS文档存储或MS Azure Blob存储的端点。 | 字符串 | "http://localhost/s3" |
storage.bucketName | 定义S3 AWS文档存储或MS Azure Blob存储的唯一名称。 | 字符串 | "cache" |
storage.storageFolderName | 定义存储所有文件的S3 AWS文档存储文件夹名称。 | 字符串 | "files" |
storage.cacheFolderName | 定义用于在多租户模式下工作的缓存文件夹名称。 | 字符串 | "data" |
storage.commandOptions | 定义允许自定义对存储发出的命令的参数,例如启用AWS KMS。 | 对象 | |
storage.commandOptions.s3 | 定义允许自定义对S3 AWS文档存储发出的命令的参数。 | 对象 | |
storage.commandOptions.s3.putObject | 定义用于将对象上传到指定S3存储桶的putObject命令类型的参数。 | 对象 | |
storage.commandOptions.s3.putObject.ServerSideEncryption | 定义新上传对象的加密类型。可用值为“aws:kms”或“AES256”。 | 字符串 | |
storage.commandOptions.s3.putObject.BucketKeyEnabled | 此为可选设置。通过减少对KMS API的调用来优化每个请求的成本。 | 布尔值 | |
storage.commandOptions.s3.putObject.SSEKMSKeyId | 定义AWS KMS中用于在对象上传后对其进行加密的客户管理密钥的标识符(ARN或密钥ID)。 | 字符串 | |
storage.commandOptions.s3.getObject | 定义用于从指定S3存储桶检索对象的getObject命令类型的参数。 | 对象 | |
storage.commandOptions.s3.copyObject | 定义用于创建存储在指定S3存储桶中的对象副本的copyObject命令类型的参数。 | 对象 | |
storage.commandOptions.s3.copyObject.ServerSideEncryption | 定义新复制对象的加密类型。可用值为“aws:kms”或“AES256”。 | 字符串 | |
storage.commandOptions.s3.copyObject.BucketKeyEnabled | 此为可选设置。通过减少对KMS API的调用来优化每个请求的成本。 | 布尔值 | |
storage.commandOptions.s3.copyObject.SSEKMSKeyId | 定义AWS KMS中用于在对象复制后对其进行加密的客户管理密钥的标识符(ARN或密钥ID)。 | 字符串 | |
storage.commandOptions.s3.copyObject.MetadataDirective | 定义Amazon S3在复制操作期间应如何处理目标对象的元数据。如果值设置为“COPY”,则源对象的元数据将复制到目标对象。如果值设置为“REPLACE”,则目标对象的元数据将被copyObject请求中提供的元数据替换,并且不会复制源对象的元数据。 | 字符串 | "COPY" |
storage.commandOptions.s3.listObjects | 定义用于检索指定S3存储桶内对象列表的listObjects命令类型的参数。 | 对象 | |
storage.commandOptions.s3.listObjects.MaxKeys | 定义响应中返回的最大对象数量。 | 整数 | 1000 |
storage.commandOptions.s3.deleteObject | 定义用于从指定S3存储桶中移除对象的deleteObject命令类型的参数。 | 对象 | |
storage.commandOptions.az | 定义允许自定义对MS Azure Blob存储发出的命令的参数。 | 对象 | |
storage.commandOptions.az.uploadData | 定义用于将数据上传到MS Azure Blob存储的uploadData命令类型的参数。 | 对象 | |
storage.commandOptions.az.uploadData.encryptionScope | 定义用于加密已上传Blob的加密范围的名称。 | 字符串 | |
storage.commandOptions.az.uploadStream | 定义用于从流上传数据到MS Azure Blob存储的uploadStream命令类型的参数。 | 对象 | |
storage.commandOptions.az.uploadStream.encryptionScope | 定义用于加密从流上传的Blob的加密范围的名称。 | 字符串 | |
storage.commandOptions.az.download | 定义用于从MS Azure Blob存储下载数据的download命令类型的参数。 | 对象 | |
storage.commandOptions.az.syncCopyFromURL | 定义用于将Blob从源URL复制到目标Blob的syncCopyFromURL命令类型的参数。 | 对象 | |
storage.commandOptions.az.syncCopyFromURL.encryptionScope | 定义用于加密已复制Blob的加密范围的名称。 | 字符串 | |
storage.commandOptions.az.listBlobsFlat | 定义用于检索容器中所有Blob列表的listBlobsFlat命令类型的参数。 | 对象 | |
storage.commandOptions.az.listBlobsFlat.maxPageSize | 定义要返回的最大Blob数量。 | 整数 | 1000 |
storage.commandOptions.az.deleteBlob | 定义用于移除Blob的deleteBlob命令类型的参数。 | 对象 | |
storage.urlExpires | 定义指向S3 AWS文档存储的URL过期时间(以毫秒为单位)。 | 整数 | 604800 |
storage.accessKeyId | 定义用于访问S3 AWS文档存储或MS Azure Blob存储的密钥ID。 | 字符串 | "" |
storage.secretAccessKey | 定义用于访问S3 AWS文档存储或MS Azure Blob存储的密钥。 | 字符串 | "" |
storage.sslEnabled | 定义S3 AWS文档存储的SSL是否启用。 | 布尔值 | false |
storage.s3ForcePathStyle | 定义对S3 AWS文档存储的请求是否始终使用路径样式寻址。 | 布尔值 | true |
storage.externalHost | 定义一个用于替代请求中指定主机的外部主机。 | 字符串 | "" |
storage.useDirectStorageUrls | 定义向外部分发存储链接的方式:直接链接或通过文档服务器代理的链接。将此参数设置为true启用直接链接,而false值允许使用内部链接(服务器将请求代理到存储)。 | 布尔值 | false |
这些参数定义了文档存储服务的配置。
示例
"storage": {
"name": "storage-fs",
"fs": {
"folderPath": "",
"urlExpires": 900,
"secretString": "verysecretstring"
},
"region": "",
"endpoint": "http://localhost/s3",
"bucketName": "cache",
"storageFolderName": "files",
"cacheFolderName": "data",
"commandOptions": {
"s3": {
"putObject": {},
"getObject": {},
"copyObject": {
"MetadataDirective": "COPY"
},
"listObjects": {
"MaxKeys": 1000
},
"deleteObject": {}
},
"az": {
"uploadData": {},
"uploadStream": {},
"download": {},
"syncCopyFromURL": {},
"listBlobsFlat": {
"maxPageSize": 1000
},
"deleteBlob": {}
}
},
"urlExpires": 604800,
"accessKeyId": "",
"secretAccessKey": "",
"sslEnabled": false,
"s3ForcePathStyle": true,
"externalHost": "",
"useDirectStorageUrls": false
}
持久化存储
这些参数定义了持久化存储的设置,用于分离文档缓存文件存储与遗忘和错误文件存储的配置。 未在此对象中指定的设置将从storage对象继承。这种分离便于服务器升级。
示例
"persistentStorage": {
}
RabbitMQ
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
rabbitmq.url | 定义RabbitMQ的URL。 请注意,从8.3版本开始,此参数在default.json和local.json文件中的值是不同的。 | 字符串 | "amqp://localhost:5672" |
rabbitmq.socketOptions | 定义将传递给套接字库(
| 对象 | {} |
rabbitmq.exchangepubsub | 定义发布订阅交换服务器。 | 对象 | |
rabbitmq.exchangepubsub.name | 定义发布订阅服务器的名称。 | 字符串 | "ds.pubsub" |
rabbitmq.exchangepubsub.options | 定义发布订阅服务器的设置。 | 对象 | |
rabbitmq.exchangepubsub.options.durable | 定义队列是否在代理重启后仍然存在。 | 布尔值 | true |
rabbitmq.queuepubsub | 定义发布订阅队列。 | 对象 | |
rabbitmq.queuepubsub.name | 定义发布订阅队列的名称。 | 字符串 | "" |
rabbitmq.queuepubsub.options | 定义发布订阅队列的设置。 | 对象 | |
rabbitmq.queuepubsub.options.autoDelete | 定义当消费者数量降为零时,队列是否会被删除。 | 布尔值 | true |
rabbitmq.queuepubsub.options.exclusive | 定义队列是否仅限于该连接。 | 布尔值 | true |
rabbitmq.queuepubsub.options.arguments | 定义附加参数,通常用于某些特定于代理的扩展,例如高可用性、TTL。 | 对象 | |
rabbitmq.queuepubsub.options.arguments.x-queue-type | 定义指定队列类型的x-queue-type头的值。只能使用经典队列。 | 字符串 | "classic" |
rabbitmq.queueconverttask | 定义任务队列。 | 对象 | |
rabbitmq.queueconverttask.name | 定义任务队列的名称。 | 字符串 | "ds.converttask6" |
rabbitmq.queueconverttask.options | 定义任务队列的设置。 | 对象 | |
rabbitmq.queueconverttask.options.durable | 定义队列是否在代理重启后仍然存在。 | 布尔值 | true |
rabbitmq.queueconverttask.options.maxPriority | 定义队列优先级。 | 整数 | 6 |
rabbitmq.queueconverttask.options.arguments | 定义附加参数,通常用于某些特定于代理的扩展,例如高可用性、TTL。 | 对象 | |
rabbitmq.queueconverttask.options.arguments.x-queue-type | 定义指定队列类型的x-queue-type头的值。此设置可用于设置仲裁队列。 | 字符串 | "classic" |
rabbitmq.queueconvertresponse | 定义响应队列。 | 对象 | |
rabbitmq.queueconvertresponse.name | 定义响应队列的名称。 | 字符串 | "ds.convertresponse" |
rabbitmq.queueconvertresponse.options | 定义响应队列的设置。 | 对象 | |
rabbitmq.queueconvertresponse.options.durable | 定义队列是否在代理重启后仍然存在。 | 布尔值 | true |
rabbitmq.queueconvertresponse.options.arguments | 定义附加参数,通常用于某些特定于代理的扩展,例如高可用性、TTL。 | 对象 | |
rabbitmq.queueconvertresponse.options.arguments.x-queue-type | 定义指定队列类型的x-queue-type头的值。此设置可用于设置仲裁队列。 | 字符串 | "classic" |
rabbitmq.exchangeconvertdead | 定义一个死信交换器。 | 对象 | |
rabbitmq.exchangeconvertdead.name | 定义死信交换器的名称。 | 字符串 | "ds.exchangeconvertdead" |
rabbitmq.exchangeconvertdead.options | 定义死信交换器的设置。 | 对象 | |
rabbitmq.exchangeconvertdead.options.durable | 定义队列是否在代理重启后仍然存在。 | 布尔值 | true |
rabbitmq.queueconvertdead | 定义一个死信队列。 | 对象 | |
rabbitmq.queueconvertdead.name | 定义死信队列的名称。 | 字符串 | "ds.convertdead" |
rabbitmq.queueconvertdead.options | 定义死信队列的设置。 | 对象 | |
rabbitmq.queueconvertdead.options.durable | 定义队列是否在代理重启后仍然存在。 | 布尔值 | true |
rabbitmq.queueconvertdead.options.arguments | 定义附加参数,通常用于某些特定于代理的扩展,例如高可用性、TTL。 | 对象 | |
rabbitmq.queueconvertdead.options.arguments.x-queue-type | 定义指定队列类型的x-queue-type头的值。此设置可用于设置仲裁队列。 | 字符串 | "classic" |
rabbitmq.queuedelayed | 定义延迟队列。 | 对象 | |
rabbitmq.queuedelayed.name | 定义延迟队列的名称。 | 字符串 | "ds.delayed" |
rabbitmq.queuedelayed.options | 定义延迟队列的设置。 | 对象 | |
rabbitmq.queuedelayed.options.durable | 定义队列是否在代理重启后仍然存在。 | 布尔值 | true |
rabbitmq.queuedelayed.options.arguments | 定义附加参数,通常用于某些特定于代理的扩展,例如高可用性、TTL。 | 对象 | |
rabbitmq.queuedelayed.options.arguments.x-queue-type | 定义指定队列类型的x-queue-type头的值。此设置可用于设置仲裁队列。 | 字符串 | "classic" |
这些参数定义了RabbitMQ消息代理的配置。
示例
"rabbitmq": {
"url": "amqp://localhost:5672",
"socketOptions": {},
"exchangepubsub": {
"name": "ds.pubsub",
"options": {
"durable": true
}
},
"queuepubsub": {
"name": "",
"options": {
"autoDelete": true,
"exclusive": true,
"arguments": {
"x-queue-type": "classic"
}
}
},
"queueconverttask": {
"name": "ds.converttask6",
"options": {
"durable": true,
"maxPriority": 6,
"arguments": {
"x-queue-type": "classic"
}
}
},
"queueconvertresponse": {
"name": "ds.convertresponse",
"options": {
"durable": true,
"arguments": {
"x-queue-type": "classic"
}
}
},
"exchangeconvertdead": {
"name": "ds.exchangeconvertdead",
"options": {
"durable": true
}
},
"queueconvertdead": {
"name": "ds.convertdead",
"options": {
"durable": true,
"arguments": {
"x-queue-type": "classic"
}
}
},
"queuedelayed": {
"name": "ds.delayed",
"options": {
"durable": true,
"arguments": {
"x-queue-type": "classic"
}
}
}
}
ActiveMQ
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
activemq.connectOptions | 定义ActiveMQ连接选项。 | 对象 | |
activemq.connectOptions.port | 定义ActiveMQ容器所连接服务器的端口。 | 整数 | 5672 |
activemq.connectOptions.host | 定义ActiveMQ容器所连接服务器的主机(主机名或IP地址)。 | 字符串 | "localhost" |
activemq.connectOptions.reconnect | 定义ActiveMQ模块在断开连接时是否自动尝试重新连接(true)或不尝试(false)。 | 布尔值 | false |
activemq.queueconverttask | 定义任务队列。 | 字符串 | "ds.converttask" |
activemq.queueconvertresponse | 定义响应队列。 | 字符串 | "ds.convertresponse" |
activemq.queueconvertdead | 定义死信队列。 | 字符串 | "ActiveMQ.DLQ" |
activemq.queuedelayed | 定义延迟队列。 | 字符串 | "ds.delayed" |
activemq.topicpubsub | 定义发布订阅主题。 | 字符串 | "ds.pubsub" |
这些参数定义了ActiveMQ消息代理的配置。
示例
"activemq": {
"connectOptions": {
"port": 5672,
"host": "localhost",
"reconnect": false
},
"queueconverttask": "ds.converttask",
"queueconvertresponse": "ds.convertresponse",
"queueconvertdead": "ActiveMQ.DLQ",
"queuedelayed": "ds.delayed",
"topicpubsub": "ds.pubsub"
}
DNS缓存
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
dnscache.enable | 定义是否启用DNS缓存。 | 布尔值 | true |
dnscache.ttl | 定义DNS记录的过期时间(以秒为单位)。 | 整数 | 300 |
dnscache.cachesize | 定义DNS缓存大小。 | 整数 | 1000 |
这些参数定义了用于IP过滤器的DNS缓存的配置。
示例
"dnscache": {
"enable" : true,
"ttl" : 300,
"cachesize" : 1000
}
OpenPGP协议
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
openpgpjs.config | 定义OpenPGP协议配置。 | 对象 | {} |
openpgpjs.encrypt | 定义OpenPGP加密设置。 | 对象 | |
openpgpjs.encrypt.passwords | 定义用于OpenPGP加密的密码。 | 字符串数组 | ["verysecretstring"] |
openpgpjs.decrypt | 定义OpenPGP解密设置。 | 对象 | |
openpgpjs.decrypt.passwords | 定义用于OpenPGP解密的密码。 | 字符串数组 | ["verysecretstring"] |
这些参数定义了OpenPGP协议的设置,该协议用于在打开加密文档进行编辑时对密码进行加密。
示例
"openpgpjs": {
"config": {
},
"encrypt": {
"passwords": ["verysecretstring"]
},
"decrypt": {
"passwords": ["verysecretstring"]
}
}
AES-256-GCM算法
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
aesEncrypt.config | 定义AES-256-GCM算法配置。 | 对象 | |
aesEncrypt.config.keyByteLength | 定义密钥长度(以字节为单位)。 | 整数 | 32 |
aesEncrypt.config.saltByteLength | 定义盐值长度(以字节为单位)。 | 整数 | 64 |
aesEncrypt.config.initializationVectorByteLength | 定义初始化向量长度(以字节为单位)。 | 整数 | 16 |
aesEncrypt.config.iterationsByteLength | 定义迭代次数长度(以字节为单位)。 | 整数 | 5 |
aesEncrypt.secret | 定义用于AES-256-GCM加密的密码。 | 字符串 | "verysecretstring" |
这些参数定义了用于文档密码保护的AES-256-GCM加密算法的设置。
示例
"aesEncrypt": {
"config": {
"keyByteLength": 32,
"saltByteLength": 64,
"initializationVectorByteLength": 16,
"iterationsByteLength": 5
},
"secret": "verysecretstring"
}
Bottleneck
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
bottleneck.getChanges | 定义用于生成限制器以节流数据库请求的构造函数选项。 | 对象 | {} |
此参数定义Bottleneck的配置。
示例
"bottleneck": {
"getChanges": {
}
}
Windows系统根证书
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
win-ca.inject | 定义Windows系统根证书的注入模式。“+”表示使用新的实验性方法来安装证书。 | 字符串 | "+" |
此参数定义Windows系统根证书的设置。
示例
"win-ca": {
"inject": "+"
}
WOPI
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
wopi.enable | 定义是否启用WOPI。 | 布尔值 | false |
wopi.host | 定义WOPI主机(主机名或IP地址)。 | 字符串 | "" |
wopi.htmlTemplate | 定义WOPI HTML模板的路径。 | 字符串 | "../../web-apps/apps/api/wopi" |
wopi.wopiZone | 定义文档服务器用于将浏览器导航到WOPI应用程序的区域。 | 字符串 | "external-http" |
wopi.favIconUrlWord | 定义文档编辑器的favicon路径。 | 字符串 | "/web-apps/apps/documenteditor/main/resources/img/favicon.ico" |
wopi.favIconUrlCell | 定义电子表格编辑器的favicon路径。 | 字符串 | "/web-apps/apps/spreadsheeteditor/main/resources/img/favicon.ico" |
wopi.favIconUrlSlide | 定义演示文稿编辑器的favicon路径。 | 字符串 | "/web-apps/apps/presentationeditor/main/resources/img/favicon.ico" |
wopi.favIconUrlPdf | 定义PDF编辑器的favicon路径。 | 字符串 | "/web-apps/apps/pdfeditor/main/resources/img/favicon.ico" |
wopi.favIconUrlDiagram | 定义图表编辑器的favicon路径。 | 字符串 | "/web-apps/apps/visioeditor/main/resources/img/favicon.ico" |
wopi.fileInfoBlockList | 定义在将此数组发送到浏览器时被阻止的WOPI文件信息参数列表。但是,这些参数在服务器上仍然可用。 | 字符串数组 | ["FileUrl"] |
wopi.pdfView | 定义可以在PDF编辑器中查看的文件类型。 | 字符串数组 | ["djvu", "xps", "oxps"] |
wopi.pdfEdit | 定义可以在PDF编辑器中编辑的文件类型。 | 字符串数组 | ["pdf"] |
wopi.forms | 定义表单文件类型。 | 字符串数组 | ["pdf"] |
wopi.wordView | 定义可以在文档编辑器中查看的文件类型。 | 字符串数组 | ["doc", "dotm", "dot", "fodt", "ott", "rtf", "mht", "mhtml", "html", "htm", "xml", "epub", "fb2", "sxw", "stw", "wps", "wpt", "pages", "docxf", "oform", "hwp", "hwpx", "md", "hml"] |
wopi.wordEdit | 定义可以在文档编辑器中编辑的文件类型。 | 字符串数组 | ["docx", "dotx", "docm", "odt", "txt"] |
wopi.cellView | 定义可以在电子表格编辑器中查看的文件类型。 | 字符串数组 | ["xls", "xltm", "xlt", "fods", "ots", "sxc", "xml", "et", "ett", "numbers"] |
wopi.cellEdit | 定义可以在电子表格编辑器中编辑的文件类型。 | 字符串数组 | ["xlsx", "xlsb", "xltx", "xlsm", "ods", "csv"] |
wopi.slideView | 定义可以在演示文稿编辑器中查看的文件类型。 | 字符串数组 | ["ppt", "ppsx", "ppsm", "pps", "potm", "pot", "fodp", "otp", "sxi", "dps", "dpt", "key", "odg"] |
wopi.slideEdit | 定义可以在演示文稿编辑器中编辑的文件类型。 | 字符串数组 | ["pptx", "potx", "pptm", "odp"] |
wopi.diagramView | 定义可以在图表编辑器中查看的文件类型。 | 字符串数组 | ["vsdx", "vstx", "vssx", "vsdm", "vstm", "vssm"] |
wopi.diagramEdit | 定义可以在图表编辑器中编辑的文件类型。 | 字符串数组 | [] |
wopi.publicKey | 定义集成商用于检查私钥的公钥。 请注意,从8.3版本开始,此参数在default.json和local.json文件中的值是不同的。 | 字符串 | "" |
wopi.modulus | 定义用于检索公钥的、Base64编码格式的RSA模数。 请注意,从8.3版本开始,此参数在default.json和local.json文件中的值是不同的。 | 字符串 | "" |
wopi.exponent | 定义用于检索公钥的、Base64编码格式的RSA指数。 | 字符串 | 65537 |
wopi.privateKey | 定义用于对文档服务器请求进行签名的私钥。 请注意,从8.3版本开始,此参数在default.json和local.json文件中的值是不同的。 | 字符串 | "" |
wopi.publicKeyOld | 定义集成商过去用于检查私钥的旧公钥。 请注意,从8.3版本开始,此参数在default.json和local.json文件中的值是不同的。 | 字符串 | "" |
wopi.modulusOld | 定义过去用于检索公钥的、Base64编码格式的旧RSA模数。 请注意,从8.3版本开始,此参数在default.json和local.json文件中的值是不同的。 | 字符串 | "" |
wopi.exponentOld | 定义过去用于检索公钥的、Base64编码格式的旧RSA指数。 | 字符串 | 65537 |
wopi.privateKeyOld | 定义过去用于对文档服务器请求进行签名的旧私钥。 请注意,从8.3版本开始,此参数在default.json和local.json文件中的值是不同的。 | 字符串 | "" |
wopi.refreshLockInterval | 定义通过将文件的自动过期计时器重置为30分钟来刷新文件锁定的间隔时间(以分钟为单位)。 | 字符串 | "10m" |
wopi.dummy | 定义用于压力测试的虚拟处理程序的属性。 | 对象 | |
wopi.dummy.enable | 定义是否启用虚拟处理程序。 | 布尔值 | false |
wopi.dummy.sampleFilePath | 定义示例文件的虚拟路径。 | 字符串 | "" |
这些参数定义了WOPI协议的配置。
示例
"wopi": {
"enable": false,
"host": "",
"htmlTemplate": "../../web-apps/apps/api/wopi",
"wopiZone": "external-http",
"favIconUrlWord": "/web-apps/apps/documenteditor/main/resources/img/favicon.ico",
"favIconUrlCell": "/web-apps/apps/spreadsheeteditor/main/resources/img/favicon.ico",
"favIconUrlSlide": "/web-apps/apps/presentationeditor/main/resources/img/favicon.ico",
"favIconUrlPdf": "/web-apps/apps/pdfeditor/main/resources/img/favicon.ico",
"favIconUrlDiagram": "/web-apps/apps/visioeditor/main/resources/img/favicon.ico",
"fileInfoBlockList": ["FileUrl"],
"pdfView": ["djvu", "xps", "oxps"],
"pdfEdit": ["pdf"],
"forms": ["pdf"],
"wordView": ["doc", "dotm", "dot", "fodt", "ott", "rtf", "mht", "mhtml", "html", "htm", "xml", "epub", "fb2", "sxw", "stw", "wps", "wpt", "pages", "docxf", "oform", "hwp", "hwpx", "md", "hml"],
"wordEdit": ["docx", "dotx", "docm", "odt", "txt"],
"cellView": ["xls", "xltm", "xlt", "fods", "ots", "sxc", "xml", "et", "ett", "numbers"],
"cellEdit": ["xlsx", "xlsb", "xltx", "xlsm", "ods", "csv"],
"slideView": ["ppt", "ppsx", "ppsm", "pps", "potm", "pot", "fodp", "otp", "sxi", "dps", "dpt", "key", "odg"],
"slideEdit": ["pptx", "potx", "pptm", "odp"],
"diagramView": ["vsdx", "vstx", "vssx", "vsdm", "vstm", "vssm"],
"diagramEdit": [],
"publicKey": "",
"modulus": "",
"exponent": 65537,
"privateKey": "",
"publicKeyOld": "",
"modulusOld": "",
"exponentOld": 65537,
"privateKeyOld": "",
"refreshLockInterval": "10m",
"dummy": {
"enable": false,
"sampleFilePath": ""
}
}
租户
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
tenants.baseDir | 定义一个目录,该目录限制ONLYOFFICE文档可以访问的文件。 | 字符串 | "" |
tenants.baseDomain | 定义租户的基本域名。 | 字符串 | "" |
tenants.filenameConfig | 定义租户文件夹中用于覆盖default.json的配置文件的名称。它在多租户模式下用于初始化特定的租户设置(wopi,ipfilter,jwt密钥等)。 | 字符串 | "config.json" |
tenants.filenameSecret | 定义存储租户密钥的.pem文件名。 | 字符串 | "secret.key" |
tenants.filenameLicense | 定义存储租户许可证的文件名。 | 字符串 | "license.lic" |
tenants.defaultTenant | 定义默认租户的域名。 | 字符串 | "localhost" |
tenants.cache | 定义用于读取多租户许可证和密钥的缓存属性。 | 对象 | |
tenants.cache.stdTTL | 为每个生成的缓存元素定义TTL(生存时间)(以秒为单位)。 | 整数 | 300 |
tenants.cache.checkperiod | 定义用于自动删除检查间隔的周期(以秒为单位)。 | 整数 | 60 |
tenants.cache.useClones | 定义是否克隆缓存的变量。如果为true,将创建缓存变量的副本。如果为false,则仅保存引用。 | 布尔值 | false |
这些参数定义了在多租户模式下工作的租户属性。
示例
"tenants": {
"baseDir" : "",
"baseDomain" : "",
"filenameConfig" : "config.json",
"filenameSecret" : "secret.key",
"filenameLicense" : "license.lic",
"defaultTenant" : "localhost",
"cache": {
"stdTTL": 300,
"checkperiod": 60,
"useClones": false
},
}
外部请求
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
externalRequest.directIfIn | 定义允许直接请求的IP地址。 | 对象 | |
externalRequest.directIfIn.allowList | 定义受信任的直接请求IP地址列表。 | 列表 | [] |
externalRequest.directIfIn.jwtToken | 定义受信任的IP地址是否在JWT中。 | 布尔值 | true |
externalRequest.action | 定义外部请求选项。 | 对象 | |
externalRequest.action.allow | 定义是否允许外部请求。 | 布尔值 | true |
externalRequest.action.blockPrivateIP | 定义是否阻止私有IP地址。 | 布尔值 | true |
externalRequest.action.proxyUrl | 定义代理URL。 | 字符串 | "" |
externalRequest.action.proxyUser | 定义代理认证参数。 | 对象 | |
externalRequest.action.proxyUser.username | 定义代理认证用户名。 | 字符串 | "" |
externalRequest.action.proxyUser.password | 定义代理认证密码。 | 字符串 | "" |
externalRequest.action.proxyHeaders | 定义代理头信息。 | 对象 | {} |
这些参数定义了外部请求的配置。
示例
"externalRequest": {
"directIfIn" : {
"allowList": [],
"jwtToken": true
},
"action": {
"allow": true,
"blockPrivateIP": true,
"proxyUrl": "",
"proxyUser": {
"username": "",
"password": ""
},
"proxyHeaders": {
}
}
}
文档服务器服务
这些参数定义了文档服务器服务的设置。
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring | 定义协同编辑会话的设置。 | 对象 |
服务器
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.server.port | 定义服务器端口。 | 整数 | 8000 |
services.CoAuthoring.server.workerpercpu | 定义每个CPU的工作线程数量。 | 整数 | 1 |
services.CoAuthoring.server.mode | 定义服务器模式。 | 字符串 | "development" |
services.CoAuthoring.server.limits_tempfile_upload | 定义每个进程使用的所有已上传临时文件的最大大小(以字节为单位)。 | 整数 | 104857600 |
services.CoAuthoring.server.limits_image_size | 定义每个进程上传的所有图像的最大大小(以字节为单位)。 | 整数 | 26214400 |
services.CoAuthoring.server.limits_image_download_timeout | 定义下载图像的超时属性。 | 对象 | |
services.CoAuthoring.server.limits_image_download_timeout.connectionAndInactivity | 定义指定两个超时的周期:
此参数发送给npm模块。 | 字符串 | "2m" |
services.CoAuthoring.server.limits_image_download_timeout.wholeCycle | 定义整个请求周期 - 从下载开始到完全下载的时段。 | 字符串 | "2m" |
services.CoAuthoring.server.callbackRequestTimeout | 定义回调请求的超时属性。 | 对象 | |
services.CoAuthoring.server.callbackRequestTimeout.connectionAndInactivity | 定义指定两个超时的周期:
此参数发送给npm模块。 | 字符串 | "10m" |
services.CoAuthoring.server.callbackRequestTimeout.wholeCycle | 定义整个请求周期的超时时间。 | 字符串 | "10m" |
services.CoAuthoring.server.healthcheckfilepath | 定义健康检查请求将被发送到的路径。 | 字符串 | "../public/healthcheck.docx" |
services.CoAuthoring.server.savetimeoutdelay | 定义编辑文件关闭后的转换启动延迟时间(以毫秒为单位)。 | 整数 | 5000 |
services.CoAuthoring.server.edit_singleton | 定义是否可编辑单例。 | 布尔值 | false |
services.CoAuthoring.server.forgottenfiles | 定义存储所有遗忘文件的文件夹名称。 | 字符串 | "forgotten" |
services.CoAuthoring.server.forgottenfilesname | 定义遗忘文件的名称。 | 字符串 | "output" |
services.CoAuthoring.server.maxRequestChanges | 定义请求更改的最大大小。 | 整数 | 20000 |
services.CoAuthoring.server.openProtectedFile | 定义是否可以打开受密码保护的文件。 | 布尔值 | true |
services.CoAuthoring.server.isAnonymousSupport | 定义匿名用户是否可以访问编辑器或实时查看器。 | 布尔值 | true |
services.CoAuthoring.server.editorDataStorage | 定义编辑器数据存储。可能的值:"editorDataRedis",""。 | 字符串 | "editorDataRedis" |
services.CoAuthoring.server.editorStatStorage | 定义用于许可证计算和统计的编辑器数据存储(本地内存或redis)。可能的值是"editorDataMemory","editorDataRedis"或""。默认值""表示将使用editorDataStorage参数的值。此参数主要用于分片集群。 | 字符串 | "" |
services.CoAuthoring.server.assemblyFormatAsOrigin | 定义汇编后的文件是否以其原始格式保存。 | 布尔值 | true |
services.CoAuthoring.server.newFileTemplate | 定义如果从用于打开的链接接收到0字节文件时,“新建”文件模板的路径。 | 字符串 | "../../document-templates/new" |
services.CoAuthoring.server.downloadFileAllowExt | 定义允许通过downloadFile处理程序下载的扩展名。 | 字符串数组 | ["pdf", "xlsx"] |
services.CoAuthoring.server.tokenRequiredParams | 定义是否验证所需的令牌参数。出于安全考虑,这是必需的。例如,转换令牌将不会用于打开文档。 | 布尔值 | true |
services.CoAuthoring.server.forceSaveUsingButtonWithoutChanges | 定义通过单击保存按钮是否可以强制保存没有任何更改的文件。 | 布尔值 | false |
这些参数定义了服务器的配置。
示例
"services": {
"CoAuthoring": {
"server": {
"port": 8000,
"workerpercpu": 1,
"mode": "development",
"limits_tempfile_upload": 104857600,
"limits_image_size": 26214400,
"limits_image_download_timeout": {
"connectionAndInactivity": "2m",
"wholeCycle": "2m"
},
"callbackRequestTimeout": {
"connectionAndInactivity": "10m",
"wholeCycle": "10m"
},
"healthcheckfilepath": "../public/healthcheck.docx",
"savetimeoutdelay": 5000,
"edit_singleton": false,
"forgottenfiles": "forgotten",
"forgottenfilesname": "output",
"maxRequestChanges": 20000,
"openProtectedFile": true,
"isAnonymousSupport": true,
"editorDataStorage": "editorDataRedis",
"editorStatStorage": "",
"assemblyFormatAsOrigin": true,
"newFileTemplate" : "../../document-templates/new",
"downloadFileAllowExt": ["pdf", "xlsx"],
"tokenRequiredParams": true,
"forceSaveUsingButtonWithoutChanges": false
}
}
}
默认请求
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.requestDefault.headers | 定义默认的HTTP请求头。 | 对象 | |
services.CoAuthoring.requestDefault.headers.User-Agent | 定义默认的User-Agent请求头。 | 字符串 | "Node.js/6.13" |
services.CoAuthoring.requestDefault.headers.Connection | 定义默认的Connection请求头。 | 字符串 | "Keep-Alive" |
services.CoAuthoring.requestDefault.rejectUnauthorized | 定义证书是否将由文档服务器验证。 | 布尔值 | true |
这些参数定义了默认请求配置。
示例
"services": {
"CoAuthoring": {
"requestDefaults": {
"headers": {
"User-Agent": "Node.js/6.13",
"Connection": "Keep-Alive"
},
"rejectUnauthorized": true
}
}
}
自动汇编
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.autoAssembly.enable | 定义是否启用自动强制保存。 | 布尔值 | false |
services.CoAuthoring.autoAssembly.interval | 定义启动自动强制保存的间隔时间(以分钟为单位)。 | 字符串 | "5m" |
services.CoAuthoring.autoAssembly.step | 定义间隔之间的延迟时间(以分钟为单位)。 | 字符串 | "1m" |
这些参数定义了自动强制保存配置。
示例
"services": {
"CoAuthoring": {
"autoAssembly": {
"enable": false,
"interval": "5m",
"step": "1m"
}
}
}
实用工具
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.utils.utils_common_fontdir | 定义存储所有字体的目录。 | 字符串 | "null" |
services.CoAuthoring.utils.utils_fonts_search_patterns | 定义用于搜索相应扩展名字体文件的模式。 | 字符串 | "*.ttf;*.ttc;*.otf" |
services.CoAuthoring.utils.limits_image_types_upload | 定义支持上传的图像格式。 | 字符串 | "jpg;jpeg;jpe;png;gif;bmp;svg;tiff;tif" |
这些参数定义了实用工具的配置。
示例
"services": {
"CoAuthoring": {
"utils": {
"utils_common_fontdir": "null",
"utils_fonts_search_patterns": "*.ttf;*.ttc;*.otf",
"limits_image_types_upload": "jpg;jpeg;jpe;png;gif;bmp;svg;tiff;tif"
}
}
}
SQL
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.sql.type | 定义数据库类型(mysql,mariadb,mssql,postgres,dameng,oracle)。 | 字符串 | "postgres" |
services.CoAuthoring.sql.tableChanges | 定义存储所有文档更改的数据库表名。 | 字符串 | "doc_changes" |
services.CoAuthoring.sql.tableResult | 定义存储查询结果的数据库表名。 | 字符串 | "task_result" |
services.CoAuthoring.sql.dbHost | 定义数据库服务器主机(主机名或IP地址)。 | 字符串 | "localhost" |
services.CoAuthoring.sql.dbPort | 定义数据库服务器端口。 | 整数 | 5432 |
services.CoAuthoring.sql.dbName | 定义在镜像启动时要创建的数据库名称。 | 字符串 | "onlyoffice" |
services.CoAuthoring.sql.dbUser | 定义为数据库帐户设置的具有超级用户权限的新用户名。 | 字符串 | "onlyoffice" |
services.CoAuthoring.sql.dbPass | 定义设置为数据库帐户的密码。 | 字符串 | "onlyoffice" |
services.CoAuthoring.sql.charset | 定义数据库字符集。 | 字符串 | "utf8" |
services.CoAuthoring.sql.connectionlimit | 定义到数据库服务器的最大同时用户连接数。 | 整数 | 10 |
services.CoAuthoring.sql.max_allowed_packet | 定义可以在一个请求中发送的数据的最大大小。 | 整数 | 1048575 |
services.CoAuthoring.sql.pgPoolExtraOptions | 定义可以直接传递给node-postgres pool库的参数。 | 对象 | |
services.CoAuthoring.sql.pgPoolExtraOptions.idleTimeoutMillis | 定义客户端在池中必须保持空闲且未被检出之前,与后端断开连接并丢弃之前的毫秒数。设置为0以禁用空闲客户端的自动断开连接。 | 整数 | 30000 |
services.CoAuthoring.sql.pgPoolExtraOptions.maxLifetimeSeconds | 定义表示最大生存期的秒数。 | 整数 | 60000 |
services.CoAuthoring.sql.pgPoolExtraOptions.statement_timeout | 定义查询语句超时前的毫秒数。 | 整数 | 60000 |
services.CoAuthoring.sql.pgPoolExtraOptions.query_timeout | 定义查询调用超时前的毫秒数。 | 整数 | 60000 |
services.CoAuthoring.sql.pgPoolExtraOptions.connectionTimeoutMillis | 定义等待连接的毫秒数。 | 整数 | 60000 |
services.CoAuthoring.sql.damengExtraOptions | 定义达梦数据库参数。 | 对象 | |
services.CoAuthoring.sql.damengExtraOptions.columnNameUpperCase | 定义列名是否大写。 | 布尔值 | false |
services.CoAuthoring.sql.damengExtraOptions.columnNameCase | 定义列名的大小写。 | 字符串 | "lower" |
services.CoAuthoring.sql.damengExtraOptions.connectTimeout | 定义等待连接的毫秒数。 | 整数 | 60000 |
services.CoAuthoring.sql.damengExtraOptions.loginEncrypt | 定义是否启用登录加密。 | 布尔值 | false |
services.CoAuthoring.sql.damengExtraOptions.localTimezone | 定义本地时区。 | 整数 | 0 |
services.CoAuthoring.sql.damengExtraOptions.poolTimeout | 定义连接池终止空闲连接(在池中未使用)的秒数。 | 整数 | 60 |
services.CoAuthoring.sql.damengExtraOptions.socketTimeout | 定义客户端或服务器发出的连接请求未从另一端收到响应的毫秒数。 | 整数 | 60000 |
services.CoAuthoring.sql.damengExtraOptions.queueTimeout | 定义消息在队列中被丢弃前保留的毫秒数。 | 整数 | 60000 |
services.CoAuthoring.sql.oracleExtraOptions | 定义Oracle数据库参数。 | 对象 | |
services.CoAuthoring.sql.oracleExtraOptions.thin | 定义在集群中使用Oracle Instant Client以Thick模式连接到Oracle。 | 布尔值 | true |
services.CoAuthoring.sql.oracleExtraOptions.connectTimeout | 定义等待连接的秒数。 | 整数 | 60 |
services.CoAuthoring.sql.msSqlExtraOptions | 定义MS SQL数据库参数。 | 对象 | |
services.CoAuthoring.sql.msSqlExtraOptions.options | 定义MS SQL数据库选项。 | 对象 | |
services.CoAuthoring.sql.msSqlExtraOptions.options.encrypt | 定义数据在通过网络发送之前是否会被加密。 | 布尔值 | false |
services.CoAuthoring.sql.msSqlExtraOptions.options.trustServerCertificate | 定义在没有经过验证的服务器证书时是否进行加密。 | 布尔值 | true |
services.CoAuthoring.sql.msSqlExtraOptions.pool | 定义连接池的参数。 | 对象 | |
services.CoAuthoring.sql.msSqlExtraOptions.pool.idleTimeoutMillis | 定义客户端在池中必须保持空闲且未被检出之前,与后端断开连接并丢弃之前的毫秒数。设置为0以禁用空闲客户端的自动断开连接。 | 整数 | 30000 |
services.CoAuthoring.sql.mysqlExtraOptions | 定义可以直接传递给node-mysql2模块的MySQL数据库连接参数(包括SSL设置)。 | 对象 | |
services.CoAuthoring.sql.mysqlExtraOptions.connectTimeout | 定义等待连接的毫秒数。 | 整数 | 60000 |
services.CoAuthoring.sql.mysqlExtraOptions.queryTimeout | 定义查询调用超时前的毫秒数。 | 整数 | 60000 |
这些参数定义了数据库的配置。
示例
"services": {
"CoAuthoring": {
"sql": {
"type": "postgres",
"tableChanges": "doc_changes",
"tableResult": "task_result",
"dbHost": "localhost",
"dbPort": 5432,
"dbName": "onlyoffice",
"dbUser": "onlyoffice",
"dbPass": "onlyoffice",
"charset": "utf8",
"connectionlimit": 10,
"max_allowed_packet": 1048575,
"pgPoolExtraOptions": {
"idleTimeoutMillis": 30000,
"maxLifetimeSeconds": 60000,
"statement_timeout": 60000,
"query_timeout": 60000,
"connectionTimeoutMillis": 60000
},
"damengExtraOptions": {
"columnNameUpperCase": false,
"columnNameCase": "lower",
"connectTimeout": 60000,
"loginEncrypt": false,
"localTimezone": 0,
"poolTimeout": 60,
"socketTimeout": 60000,
"queueTimeout": 60000
},
"oracleExtraOptions": {
"thin": true,
"connectTimeout": 60
},
"msSqlExtraOptions": {
"options": {
"encrypt": false,
"trustServerCertificate": true
},
"pool": {
"idleTimeoutMillis": 30000
}
},
"mysqlExtraOptions": {
"connectTimeout": 60000,
"queryTimeout": 60000
}
}
}
}
Redis
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.redis.name | 定义数据库名称,"redis"或"ioredis"。 | 字符串 | "redis" |
services.CoAuthoring.redis.prefix | 定义Redis中所有使用结构的前缀名称。 | 字符串 | "ds:" |
services.CoAuthoring.redis.host | 定义Redis服务器主机(主机名或IP地址)。 | 字符串 | "127.0.0.1" |
services.CoAuthoring.redis.port | 定义Redis服务器端口。 | 整数 | 6379 |
services.CoAuthoring.redis.options | 定义可以直接传递给node-redis createClient库的参数(用户名、密码、模块等)。 | 对象 | {} |
services.CoAuthoring.redis.optionsCluster | 定义可以直接传递给node-redis clustering库以连接到redis集群的参数(rootNodes,defaults,模块等)。 此设置优先于用于连接到单个redis的options参数。 | 对象 | {} |
services.CoAuthoring.redis.iooptions | 定义可以直接传递给ioredis RedisOptions库的参数(用户名、密码、模块等)。 | 对象 | |
services.CoAuthoring.redis.iooptions.lazyConnect | 定义是否延迟连接到服务器,直到发送第一个命令或显式调用redis.connect()。 | 布尔值 | true |
services.CoAuthoring.redis.iooptionsClusterNodes | 定义您想要连接的集群节点列表,这些节点可以直接传递给ioredis cluster库以连接到redis集群。 此设置优先于用于连接到单个redis的iooptions参数。 | 数组 | [] |
services.CoAuthoring.redis.iooptionsClusterOptions | 定义可以直接传递给ioredis cluster库以连接到redis集群的参数(clusterRetryStrategy,dnsLookup,scaleReads等)。 此设置优先于用于连接到单个redis的iooptions参数。 | 对象 | |
services.CoAuthoring.redis.iooptionsClusterOptions.lazyConnect | 定义是否延迟连接到服务器,直到发送第一个命令或显式调用redis.connect()。 | 布尔值 | true |
这些参数定义了Redis的配置。
示例
"services": {
"CoAuthoring": {
"redis": {
"name": "redis",
"prefix": "ds:",
"host": "127.0.0.1",
"port": 6379,
"options": {},
"optionsCluster": {},
"iooptions": {
"lazyConnect": true
},
"iooptionsClusterNodes": [],
"iooptionsClusterOptions": {
"lazyConnect": true
}
}
}
}
发布订阅服务
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.pubsub.maxChanges | 定义可以通过发布订阅传递的更改的最大大小。如果大小超过指定值,则将从数据库读取更改。 | 整数 | 1000 |
此参数定义了发布订阅服务的配置。
示例
"services": {
"CoAuthoring": {
"pubsub": {
"maxChanges": 1000
}
}
}
过期时间
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.expire.saveLock | 定义保存锁的时间。 | 整数 | 60 |
services.CoAuthoring.expire.presence | 定义用户在线状态的生命周期。 | 整数 | 300 |
services.CoAuthoring.expire.locks | 定义锁的生命周期。 | 整数 | 604800 |
services.CoAuthoring.expire.changeindex | 定义更改索引的时间。 | 整数 | 86400 |
services.CoAuthoring.expire.lockDoc | 定义锁定文档的时间。 | 整数 | 30 |
services.CoAuthoring.expire.message | 定义消息的生命周期。 | 整数 | 86400 |
services.CoAuthoring.expire.lastsave | 定义上次成功执行的数据库保存的生命周期。 | 整数 | 604800 |
services.CoAuthoring.expire.forcesave | 定义成功执行的强制保存的生命周期。 | 整数 | 604800 |
services.CoAuthoring.expire.forcesaveLock | 定义在ioredis集群模式下强制保存的锁的生命周期。 | 整数 | 5000 |
services.CoAuthoring.expire.saved | 定义成功执行的数据库保存的生命周期。 | 整数 | 3600 |
services.CoAuthoring.expire.documentsCron | 定义启动检查的时间,在此期间旧文件将从缓存中删除(默认每两分钟)。 | 字符串 | "0 */2 * * * *" |
services.CoAuthoring.expire.files | 定义App_Data中文件夹的生命周期。 | 整数 | 86400 |
services.CoAuthoring.expire.filesCron | 定义开始检查的时间(默认每小时一次)。 | 字符串 | "00 00 */1 * * *" |
services.CoAuthoring.expire.filesremovedatonce | 定义同时从缓存中删除的文档文件夹数量。 | 整数 | 100 |
services.CoAuthoring.expire.sessionidle | 定义非活动会话的生命周期。此参数允许结束空闲用户的编辑会话。它也用于通过终止最后一个编辑会话来初始化文档保存过程。因此,它定义了非活动用户将被断开编辑会话连接的时间。其值格式为"1s"、"1m"、"1h"、"1d"等。 请注意,非活动状态指的是编辑器中没有任何操作,包括光标移动。 | 字符串 | "1h" |
services.CoAuthoring.expire.sessionabsolute | 定义任何编辑会话的生命周期。 | 字符串 | "30d" |
services.CoAuthoring.expire.sessionclosecommand | 定义在sessionidle或sessionabsolute ttl过期之前发送警告消息的时间。 | 字符串 | "2m" |
services.CoAuthoring.expire.pemStdTTL | 定义带有密钥的PEM文件的生命周期。 | 字符串 | "1h" |
services.CoAuthoring.expire.pemCheckPeriod | 定义检查PEM文件ttl的时间。 | 字符串 | "10m" |
services.CoAuthoring.expire.updateVersionStatus | 定义在由于使用旧密钥打开已保存的文件而发生错误后,用户可以再次打开文件的时间。 | 字符串 | "5m" |
services.CoAuthoring.expire.monthUniqueUsers | 定义月度唯一用户列表的生命周期。 | 字符串 | "1y" |
这些参数定义了过期设置。
示例
"services": {
"CoAuthoring": {
"expire": {
"saveLock": 60,
"presence": 300,
"locks": 604800,
"changeindex": 86400,
"lockDoc": 30,
"message": 86400,
"lastsave": 604800,
"forcesave": 604800,
"forcesaveLock": 5000,
"saved": 3600,
"documentsCron": "0 */2 * * * *",
"files": 86400,
"filesCron": "00 00 */1 * * *",
"filesremovedatonce": 100,
"sessionidle": "1h",
"sessionabsolute": "30d",
"sessionclosecommand": "2m",
"pemStdTTL": "1h",
"pemCheckPeriod": "10m",
"updateVersionStatus": "5m",
"monthUniqueUsers": "1y"
}
}
}
IP过滤器
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.ipfilter.rules | 定义包含以下参数的IP过滤器规则:
| 对象数组 | |
services.CoAuthoring.ipfilter.useforrequest | 定义IP过滤器是否用于请求。 | 布尔值 | false |
services.CoAuthoring.ipfilter.errorcode | 为IP过滤器定义错误代码。 | 整数 | 403 |
这些参数定义了IP过滤器的配置。
示例
"services": {
"CoAuthoring": {
"ipfilter": {
"rules": [{"address": "*", "allowed": true}],
"useforrequest": false,
"errorcode": 403
}
}
}
请求过滤代理
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.request-filtering-agent.allowPrivateIPAddress | 定义是否允许连接私有IP地址。这包括私有IP地址和保留IP地址。 | 布尔值 | false |
services.CoAuthoring.request-filtering-agent.allowMetaIPAddress | 定义是否允许连接元IP地址。元地址可以是0.0.0.0(IPv4)或::(IPv6)- 一个路由其他地址的元地址。 | 布尔值 | false |
这些参数定义了请求过滤代理配置。
示例
"services": {
"CoAuthoring": {
"request-filtering-agent" : {
"allowPrivateIPAddress": false,
"allowMetaIPAddress": false
}
}
}
密钥
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.secret.browser | 定义用于在客户端浏览器请求中生成令牌以访问ONLYOFFICE文档的密钥参数:
| 对象 | |
services.CoAuthoring.secret.inbox | 定义用于在来自文档存储服务的传入HTTP请求中生成令牌以发送给文档命令服务、文档转换服务和文档构建服务的密钥参数:
| 对象 | |
services.CoAuthoring.secret.outbox | 定义用于在文档编辑服务发送到
| 对象 | |
services.CoAuthoring.secret.session | 定义用于生成会话令牌的密钥参数:
| 对象 |
这些参数定义了密钥的配置。
示例
"services": {
"CoAuthoring": {
"secret": {
"browser": {"string": "secret", "file": ""},
"inbox": {"string": "secret", "file": ""},
"outbox": {"string": "secret", "file": ""},
"session": {"string": "secret", "file": ""}
}
}
}
令牌
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.token.enable | 定义是否启用令牌。 | 对象 | |
services.CoAuthoring.token.enable.browser | 定义是否在客户端浏览器请求中启用令牌。 | 布尔值 | false |
services.CoAuthoring.token.enable.request | 定义是否在HTTP请求中启用令牌。 | 对象 | |
services.CoAuthoring.token.enable.request.inbox | 定义是否在传入的HTTP请求中启用令牌。 | 布尔值 | false |
services.CoAuthoring.token.enable.request.outbox | 定义是否在传出的HTTP请求中启用令牌。 | 布尔值 | false |
services.CoAuthoring.token.browser | 定义浏览器令牌的配置。 | 对象 | |
services.CoAuthoring.token.browser.secretFromInbox | 定义浏览器令牌是否与来自传入请求的令牌相同(true)或不同(false)。 | 布尔值 | true |
services.CoAuthoring.token.inbox | 定义来自传入请求的令牌的配置。 | 对象 | |
services.CoAuthoring.token.inbox.header | 定义将用于发送传入请求令牌的HTTP头。 | 字符串 | "Authorization" |
services.CoAuthoring.token.inbox.prefix | 定义将用于发送传入请求令牌的HTTP头中的前缀。 | 字符串 | "Bearer " |
services.CoAuthoring.token.inbox.inBody | 定义是否在传入请求体中启用令牌。 | 布尔值 | false |
services.CoAuthoring.token.outbox | 定义来自传出请求的令牌的配置。 | 对象 | |
services.CoAuthoring.token.outbox.header | 定义将用于发送传出请求令牌的HTTP头。 | 字符串 | "Authorization" |
services.CoAuthoring.token.outbox.prefix | 定义将用于发送传出请求令牌的HTTP头中的前缀。 | 字符串 | "Bearer " |
services.CoAuthoring.token.outbox.algorithm | 定义用于对传出请求令牌进行签名的算法。 | 字符串 | "HS256" |
services.CoAuthoring.token.outbox.expires | 定义传出请求令牌的过期时间周期。 | 字符串 | "5m" |
services.CoAuthoring.token.outbox.inBody | 定义是否在传出请求体中启用令牌。 | 布尔值 | false |
services.CoAuthoring.token.outbox.urlExclusionRegex | 定义指定应排除授权的URL的正则表达式。空字符串表示此选项已禁用。 | 字符串 | "" |
services.CoAuthoring.token.session | 定义会话令牌的配置。 | 对象 | |
services.CoAuthoring.token.session.algorithm | 定义用于对会话令牌进行签名的算法。 | 字符串 | "HS256" |
services.CoAuthoring.token.session.expires | 定义会话令牌的过期时间周期。 | 字符串 | "30d" |
services.CoAuthoring.token.verifyOptions | 定义令牌验证选项。 | 对象 | |
services.CoAuthoring.token.verifyOptions.clockTolerance | 定义在处理不同服务器之间的时钟差异时可接受的秒数。 | 整数 | 60 |
这些参数定义了令牌的配置。
示例
"services": {
"CoAuthoring": {
"token": {
"enable": {
"browser": false,
"request": {
"inbox": false,
"outbox": false
}
},
"browser": {
"secretFromInbox": true
},
"inbox": {
"header": "Authorization",
"prefix": "Bearer ",
"inBody": false
},
"outbox": {
"header": "Authorization",
"prefix": "Bearer ",
"algorithm": "HS256",
"expires": "5m",
"inBody": false,
"urlExclusionRegex": ""
},
"session": {
"algorithm": "HS256",
"expires": "30d"
},
"verifyOptions": {
"clockTolerance": 60
}
}
}
}
插件
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.plugins.uri | 定义存储所有插件的文件夹路径。 | 字符串 | "/sdkjs-plugins" |
services.CoAuthoring.plugins.autostart | 定义自动运行的插件列表。 | 列表 | [] |
这些参数定义了插件的配置。
示例
"services": {
"CoAuthoring": {
"plugins": {
"uri": "/sdkjs-plugins",
"autostart": []
}
}
}
主题
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.themes.uri | 定义存储包含自定义颜色主题的所有json文件的文件夹路径。 | 字符串 | "/web-apps/apps/common/main/resources/themes" |
此参数定义了自定义颜色主题的属性。
示例
"services": {
"CoAuthoring": {
"themes": {
"uri": "/web-apps/apps/common/main/resources/themes"
}
}
}
编辑器
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.editor.spellcheckerUrl | 定义拼写检查器的路径。 | 字符串 | "" |
services.CoAuthoring.editor.reconnection | 定义编辑器与服务器重新连接的设置。 | 对象 | |
services.CoAuthoring.editor.reconnection.attempts | 定义重新连接编辑器的最大尝试次数。 | 整数 | 50 |
services.CoAuthoring.editor.reconnection.delay | 定义重新连接编辑器的尝试延迟时间。 | 字符串 | "2s" |
services.CoAuthoring.editor.binaryChanges | 定义文档更改是以二进制(true)还是JSON(false)格式保存。 | 布尔值 | false |
services.CoAuthoring.editor.websocketMaxPayloadSize | 定义WebSocket的最大有效负载大小。 | 字符串 | "1.5MB" |
services.CoAuthoring.editor.maxChangesSize | 定义对文档所做更改的总大小限制。当超出限制时,用户将收到一个对话框,建议取消上一个操作或切换到离线模式。此设置默认禁用。 | 字符串 | "150MB" |
这些参数定义了编辑器的配置。
示例
"services": {
"CoAuthoring": {
"editor":{
"spellcheckerUrl": "",
"reconnection":{
"attempts": 50,
"delay": "2s"
},
"binaryChanges": false,
"websocketMaxPayloadSize": "1.5MB",
"maxChangesSize": "150MB"
}
}
}
SockJs
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.sockjs.sockjs_url | 定义sockjs.min.js文件的路径。 | 字符串 | "" |
services.CoAuthoring.sockjs.disable_cors | 定义是否禁用CORS。true值可防止Access-Control-Allow-Origin头漏洞。 | 布尔值 | true |
services.CoAuthoring.sockjs.websocket | 定义是否启用WebSocket协议。 | 布尔值 | true |
这些参数定义了SockJs的配置。
示例
"services": {
"CoAuthoring": {
"sockjs": {
"sockjs_url": "",
"disable_cors": true,
"websocket": true
}
}
}
Socket.IO
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.socketio.connection | 定义连接属性。 | 对象 | |
services.CoAuthoring.socketio.connection.path | 定义在服务器端捕获的路径。 | 字符串 | "/doc/" |
services.CoAuthoring.socketio.connection.serveClient | 定义是否将提供客户端文件。 | 布尔值 | false |
services.CoAuthoring.socketio.connection.pingTimeout |
定义超时期限(以毫秒为单位),在此期限内客户端必须用 pong 响应服务器 ping。如果没有响应,服务器认为连接已关闭。服务器和客户端之间的连接每 pingInterval 毫秒检查一次。
| 整数 | 20000 |
services.CoAuthoring.socketio.connection.pingInterval |
定义间隔时间(以毫秒为单位),用于检查服务器和客户端之间的连接是否仍然活跃。服务器向客户端发送 ping 数据包,如果客户端在 pingTimeout 期限内没有用 pong 响应,服务器认为连接已关闭。
| 整数 | 25000 |
services.CoAuthoring.socketio.connection.maxHttpBufferSize | 定义在关闭套接字之前,单个消息的最大字节数。 | 整数 | 1e8 |
这些参数定义 Socket.IO 模块配置。
示例
"socketio": {
"connection": {
"path": "/doc/",
"serveClient": false,
"pingTimeout": 20000,
"pingInterval": 25000,
"maxHttpBufferSize": 1e8
}
}
回调退避选项
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
services.CoAuthoring.callbackBackoffOptions.retries | 定义重试操作的最大次数。 | 整数 | 3 |
services.CoAuthoring.callbackBackoffOptions.timeout | 定义回调退避超时。 | 对象 | |
services.CoAuthoring.callbackBackoffOptions.timeout.factor | 定义使用的指数因子。 | 整数 | 2 |
services.CoAuthoring.callbackBackoffOptions.timeout.minTimeout | 定义在开始第一次尝试之前的毫秒数。 | 整数 | 1000 |
services.CoAuthoring.callbackBackoffOptions.timeout.maxTimeout | 定义两次重试之间的最大毫秒数。 | 整数 | 2147483647 |
services.CoAuthoring.callbackBackoffOptions.timeout.randomize | 定义超时是否通过乘以 1 到 2 之间的因子进行随机化。 | 布尔值 | false |
services.CoAuthoring.callbackBackoffOptions.httpStatus | 定义回调退避的 HTTP 状态。 | 字符串 | "429,500-599" |
这些参数定义回调退避选项。
示例
"services": {
"CoAuthoring": {
"callbackBackoffOptions": {
"retries": 3,
"timeout":{
"factor": 2,
"minTimeout": 1000,
"maxTimeout": 2147483647,
"randomize": false
},
"httpStatus": "429,500-599"
}
}
}
许可证
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
license.license_file | 定义许可证文件的路径。 | 字符串 | "" |
license.warning_limit_percents | 定义连接数和 connections_view限制的百分比范围,超过此范围会在日志中出现许可证限制警告。 | 整数 | 70 |
license.packageType | 定义许可证包类型:2 - 开发者版。 此参数在版本构建时设置。您无需手动配置它。 | 整数 | 2 |
license.warning_license_expiration | 定义在许可证过期前多长时间发送警告消息。 | 字符串 | "30d" |
这些参数定义许可证配置。
示例
"license" : {
"license_file": "",
"warning_limit_percents": 70,
"packageType": 2,
"warning_license_expiration": "30d"
}
转换器
| 参数 | 描述 | 类型 | 默认值 |
|---|---|---|---|
FileConverter.converter | 定义转换器属性。 | 对象 | |
FileConverter.converter.maxDownloadBytes | 定义被请求文件的最大大小(以字节为单位)。 | 整数 | 104857600 |
FileConverter.converter.downloadTimeout | 定义下载转换文件的超时属性。 | 对象 | |
FileConverter.converter.downloadTimeout.connectionAndInactivity | 定义指定两个超时的周期:
此参数发送至npm模块。 | 字符串 | "2m" |
FileConverter.converter.downloadTimeout.wholeCycle | 定义整个请求周期的超时时间。 | 字符串 | "2m" |
FileConverter.converter.downloadAttemptMaxCount | 定义下载转换文件的最大尝试次数。 | 整数 | 3 |
FileConverter.converter.downloadAttemptDelay | 定义下载转换文件的尝试延迟。 | 整数 | 1000 |
FileConverter.converter.maxprocesscount | 定义一次可以处于活动状态的转换进程的最大数量。 | 整数 | 1 |
FileConverter.converter.fontDir | 定义包含字体的文件夹路径。 | 字符串 | "null" |
FileConverter.converter.presentationThemesDir | 定义包含演示文稿主题的文件夹路径。 | 字符串 | "null" |
FileConverter.converter.x2tPath | 定义 x2t 文件转换器的路径。 | 字符串 | "null" |
FileConverter.converter.docbuilderPath | 定义 Document Builder 应用程序的路径。 | 字符串 | "null" |
FileConverter.converter.args | 定义运行 x2t 的附加参数。 | 字符串 | "" |
FileConverter.converter.spawnOptions | 定义可以直接传递给 node.js child_process.spawn 库的参数(仅用于运行 x2t)。 | 对象 | {} |
FileConverter.converter.errorfiles | 定义错误文件的路径。 | 字符串 | "" |
FileConverter.converter.streamWriterBufferSize | 定义 StreamWriter 缓冲区大小。 | 整数 | 8388608 |
FileConverter.converter.maxRedeliveredCount | 定义消息重新传递的最大次数。 | 整数 | 2 |
FileConverter.converter.inputLimits | 定义输入文件的限制。 | 对象 | |
FileConverter.converter.inputLimits.type | 定义为其指定限制的 OOXML 文件类型(文本文档/电子表格/演示文稿)。这不包括其他对象,如图像。 | 字符串 | "docx;dotx;docm;dotm"/"xlsx;xltx;xlsm;xltm"/"pptx;ppsx;potx;pptm;ppsm;potm" |
FileConverter.converter.inputLimits.zip | 定义 zip 归档文件的属性。 | 对象 | |
FileConverter.converter.inputLimits.zip.uncompressed | 定义文本文档/电子表格/演示文稿的总未压缩文件大小。 | 字符串 | "50MB"/"300MB"/"50MB" |
FileConverter.converter.inputLimits.zip.template | 定义要计算大小的文件的名称模板。 | 字符串 | "*.xml" |
这些参数定义文件转换器配置。
示例
"FileConverter": {
"converter": {
"maxDownloadBytes": 104857600,
"downloadTimeout": {
"connectionAndInactivity": "2m",
"wholeCycle": "2m"
},
"downloadAttemptMaxCount": 3,
"downloadAttemptDelay": 1000,
"maxprocesscount": 1,
"fontDir": "null",
"presentationThemesDir": "null",
"x2tPath": "null",
"docbuilderPath": "null",
"args": "",
"spawnOptions": {},
"errorfiles": "",
"streamWriterBufferSize": 8388608,
"maxRedeliveredCount": 2,
"inputLimits": [
{
"type": "docx;dotx;docm;dotm",
"zip": {
"uncompressed": "50MB",
"template": "*.xml"
}
},
{
"type": "xlsx;xltx;xlsm;xltm",
"zip": {
"uncompressed": "300MB",
"template": "*.xml"
}
},
{
"type": "pptx;ppsx;potx;pptm;ppsm;potm",
"zip": {
"uncompressed": "50MB",
"template": "*.xml"
}
}
]
}
}