From 3beb730c57b4a3650f8a0ea861a70dfd9c265200 Mon Sep 17 00:00:00 2001 From: vdyotte Date: Sun, 5 May 2024 15:37:02 -0400 Subject: [PATCH 1/2] Add documentation for the `S3_KEY_PREFIX` environment variable --- content/en/admin/config.md | 4 +++- content/en/admin/optional/object-storage.md | 7 +++++++ content/zh-cn/admin/config.md | 9 +++++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/content/en/admin/config.md b/content/en/admin/config.md index a4244056b..bd7514844 100644 --- a/content/en/admin/config.md +++ b/content/en/admin/config.md @@ -571,6 +571,8 @@ The bucket must support access control lists (ACLs). For AWS S3, this means sett #### `S3_BUCKET` +#### `S3_KEY_PREFIX` + #### `AWS_ACCESS_KEY_ID` #### `AWS_SECRET_ACCESS_KEY` @@ -821,7 +823,7 @@ It is important to use a supported file format (JPEG or PNG, not SVG). ## Limits {#limits} -### Anti Spam / Abuse +### Anti Spam / Abuse #### `HCAPTCHA_SITE_KEY` #### `HCAPTCHA_SECRET_KEY` diff --git a/content/en/admin/optional/object-storage.md b/content/en/admin/optional/object-storage.md index 7fd856e52..bb2564f9e 100644 --- a/content/en/admin/optional/object-storage.md +++ b/content/en/admin/optional/object-storage.md @@ -192,6 +192,13 @@ During batch delete operations, S3 providers may perodically fail or timeout while processing deletion requests. Mastodon will back off and retry the request up to this maximum number of times. +### `S3_KEY_PREFIX` + +Default: none + +Prefix added to all S3 object keys. Useful for hosting multiple instances on the +same bucket. Object path will become: '//\' + ### MinIO MinIO is an open-source implementation of an S3 object provider. This section does not cover how to install it, but how to configure a bucket for use in Mastodon. diff --git a/content/zh-cn/admin/config.md b/content/zh-cn/admin/config.md index 58561bc4f..d95a98e5f 100644 --- a/content/zh-cn/admin/config.md +++ b/content/zh-cn/admin/config.md @@ -26,21 +26,21 @@ Mastodon使用环境变量作为其的配置。 #### `AUTHORIZED_FETCH` {#authorized_fetch} 当设置为 `true` 时,Mastodon将停止内联签名活动,并要求远程服务器在拉取公开(public)和不公开(unlisted)的嘟文时进行身份验证。 - + 这可以阻止被屏蔽的域名拉取你的公开嘟文,但代价是可能增加计算量,并与不支持附带签名的拉取请求的软件不兼容(如低于3.0版本的Mastodon)。 - + 请注意:这个模式并不能保证你的公开嘟文(public、unlisted)不被恶意操作者获取,这仅仅是增加了一点难度。 #### `WHITELIST_MODE` {#whitelist_mode} 当设置为 `true` 时,Mastodon将仅与白名单内的服务器互联,同时关闭公开页面和一些客户端API。 白名单模式会启用 authorized fetch 模式。 - + 当一个现存实例站点切换至白名单模式,以下命令可以被用来移除非白名单站点的数据: ``` tootctl domain purge --whitelist-mode ``` - + 请注意:虽然Mastodon 3.0 版本便引入了白名单模式 `WHITELIST_MODE`,但在Mastodon 3.0和3.0.1版中并没有正确实现。 ### 密钥 {#secrets} @@ -141,6 +141,7 @@ Mastodon使用环境变量作为其的配置。 * `S3_ENABLED` * `S3_BUCKET` +* `S3_KEY_PREFIX` * `AWS_ACCESS_KEY_ID` * `AWS_SECRET_ACCESS_KEY` * `S3_REGION` From 342ae867dcad2757ea0b64fb402e12d6c399d6a6 Mon Sep 17 00:00:00 2001 From: Victor Dyotte Date: Mon, 17 Jun 2024 11:31:15 -0400 Subject: [PATCH 2/2] add version history notice Co-authored-by: Michael Stanclift --- content/en/admin/optional/object-storage.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/en/admin/optional/object-storage.md b/content/en/admin/optional/object-storage.md index bb2564f9e..8f04c9c20 100644 --- a/content/en/admin/optional/object-storage.md +++ b/content/en/admin/optional/object-storage.md @@ -198,7 +198,8 @@ Default: none Prefix added to all S3 object keys. Useful for hosting multiple instances on the same bucket. Object path will become: '//\' - +**Version history:**\ +4.3.0 - added ### MinIO MinIO is an open-source implementation of an S3 object provider. This section does not cover how to install it, but how to configure a bucket for use in Mastodon.