diff --git a/content/en/admin/config.md b/content/en/admin/config.md index 9ae2cce..0842d5e 100644 --- a/content/en/admin/config.md +++ b/content/en/admin/config.md @@ -862,6 +862,10 @@ The bucket must support access control lists (ACLs). For AWS S3, this means sett #### `S3_ALIAS_HOST` +#### `EXTRA_MEDIA_HOSTS` + +**Version history:**\ +4.4.0 - added #### `S3_OPEN_TIMEOUT` diff --git a/content/en/admin/elasticsearch.md b/content/en/admin/elasticsearch.md index db4bc35..1a39585 100644 --- a/content/en/admin/elasticsearch.md +++ b/content/en/admin/elasticsearch.md @@ -27,12 +27,6 @@ It deliberately does not allow searching for arbitrary strings in the entire dat Mastodon is tested with Elasticsearch version 7. It should support OpenSearch, as well as Elasticsearch versions 6 and 8, but those setups are not officially supported. {{< /hint >}} -Elasticsearch requires a Java runtime. If you don’t have Java already installed, do it now. Assuming you are logged in as `root`: - -```bash -apt install openjdk-17-jre-headless -``` - Add the official Elasticsearch repository to apt: ```bash diff --git a/content/en/admin/optional/object-storage-proxy.md b/content/en/admin/optional/object-storage-proxy.md index 66ad68b..748ad0d 100644 --- a/content/en/admin/optional/object-storage-proxy.md +++ b/content/en/admin/optional/object-storage-proxy.md @@ -115,6 +115,12 @@ At last, you'll want to make sure Mastodon is using your new proxy to generate f S3_ALIAS_HOST=files.example.com ``` +(Optional) If your S3_ALIAS_HOST is using a 301 redirection or similar. Add the final location to the EXTRA_MEDIA_HOSTS + +```bash +EXTRA_MEDIA_HOSTS=https://data.example1.com,https://data.example2.com +``` + And restart Mastodon: ```bash diff --git a/content/en/admin/optional/object-storage.md b/content/en/admin/optional/object-storage.md index 7879873..e27b6f4 100644 --- a/content/en/admin/optional/object-storage.md +++ b/content/en/admin/optional/object-storage.md @@ -101,6 +101,12 @@ provider, reducing egress bandwidth costs from the storage provider. This can be done in your own reverse proxy, or by using a CDN. +`EXTRA_MEDIA_HOSTS` offers appending an additional list of hosts that +are allowed to serve media for your instance. This is useful if you +include external media in your custom CSS or about page, or if your +data storage provider makes use of redirects to other domains. +`EXTRA_MEDIA_HOSTS=https://data.example1.com,https://data.example2.com` + {{< page-ref page="admin/optional/object-storage-proxy.md" >}} {{< hint style="info" >}} diff --git a/content/en/entities/Instance.md b/content/en/entities/Instance.md index 1373c75..7640641 100644 --- a/content/en/entities/Instance.md +++ b/content/en/entities/Instance.md @@ -18,7 +18,7 @@ aliases: [ { "domain": "mastodon.social", "title": "Mastodon", - "version": "4.0.0rc1", + "version": "4.4.0-alpha.3", "source_url": "https://github.com/mastodon/mastodon", "description": "The original server operated by the Mastodon gGmbH non-profit", "usage": { @@ -57,7 +57,10 @@ aliases: [ ], "configuration": { "urls": { - "streaming": "wss://mastodon.social" + "streaming": "wss://mastodon.social", + "about": "https://mastodon.social/about", + "privacy_policy": "https://mastodon.social/privacy-policy", + "terms_of_service": "https://mastodon.social/terms-of-service" }, "vapid": { "public_key": "BCkMmVdKDnKYwzVCDC99Iuc9GvId-x7-kKtuHnLgfF98ENiZp_aj-UNthbCdI70DqN1zUVis-x0Wrot2sBagkMc=" @@ -325,6 +328,27 @@ aliases: [ **Version history:**\ 4.0.0 - added +##### `configuration[urls][about]` {#about_url} + +**Description:** The URL of the server's about page.\ +**Type:** String (URL)\ +**Version history:**\ +4.4.0 - added + +##### `configuration[urls][privacy_policy]` {#privacy_policy} + +**Description:** The URL of the server's privacy policy.\ +**Type:** String (URL) or null\ +**Version history:**\ +4.4.0 - added + +##### `configuration[urls][terms_of_service]` {#terms_of_service} + +**Description:** The URL of the server's current terms of service, if any.\ +**Type:** {{}} String (URL)\ +**Version history:**\ +4.4.0 - added + ### `configuration[vapid][public_key]` {#vapid_public_key} **Description:** The instances VAPID public key, used for push notifications, the same as [WebPushSubscription#server_key]({{< relref "entities/WebPushSubscription#server_key" >}}).\ **Type:** String\ diff --git a/content/en/entities/TermsOfService.md b/content/en/entities/TermsOfService.md new file mode 100644 index 0000000..0f96552 --- /dev/null +++ b/content/en/entities/TermsOfService.md @@ -0,0 +1,62 @@ +--- +title: TermsOfService +description: Represents the terms of service of the instance. +menu: + docs: + parent: entities +aliases: [ + "/entities/termsofservice", + "/entities/TermsOfService", + "/api/entities/termsofservice", + "/api/entities/TermsOfService", +] +--- + +## Example + +```json +{ + "effective_date": "2025-04-15", + "effective": true, + "content": "

Foo bar newer

\n", + "succeeded_by": null +} +``` + +## Attributes + +### `effective_date` {#effective_date} + +**Description:** The date these terms of service are coming or have come in effect.\ +**Type:** String ([Date](/api/datetime-format#date))\ +**Version history:**\ +4.4.0 - added + +### `effective` {#effective} + +**Description:** Whether these terms of service are currently in effect.\ +**Type:** Boolean\ +**Version history:**\ +4.4.0 - added + +### `content` {#content} + +**Description:** The rendered HTML content of the terms of service.\ +**Type:** String (HTML)\ +**Version history:**\ +4.4.0 - added + +### `succeeded_by` {#succeeded_by} + +**Description:** If there are newer terms of service, their effective date.\ +**Type:** {{}} String ([Date](/api/datetime-format#date))\ +**Version history:**\ +4.4.0 - added + +## See also + +{{< page-relref ref="methods/instance#terms_of_service" caption="GET /api/v1/instance/terms_of_service" >}} + +{{< page-relref ref="methods/instance#terms_of_service_date" caption="GET /api/v1/instance/terms_of_service/:date" >}} + +{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/terms_of_service_serializer.rb" caption="app/serializers/rest/terms_of_service_serializer.rb" >}} diff --git a/content/en/methods/instance.md b/content/en/methods/instance.md index c144af9..edb2a20 100644 --- a/content/en/methods/instance.md +++ b/content/en/methods/instance.md @@ -549,7 +549,7 @@ GET /api/v1/instance/terms_of_service HTTP/1.1 Obtain the contents of this server's terms of service, if configured. -**Returns:** [PrivacyPolicy]({{< relref "entities/PrivacyPolicy" >}})\ +**Returns:** [TermsOfService]({{< relref "entities/TermsOfService" >}})\ **OAuth:** Public\ **Version history:**\ 4.4.0 - added @@ -558,7 +558,59 @@ Obtain the contents of this server's terms of service, if configured. ##### 200: OK +```json +{ + "effective_date": "2025-04-15", + "effective": true, + "content": "

Foo bar newer

\n", + "succeeded_by": null +} +``` +##### 404: Not Found + +No terms of service have been configured for this instance. + +```json +{ + "error": "Record not found" +} +``` + +--- + +## View a specific version of the terms of service {#terms_of_service_date} + +```http +GET /api/v1/instance/terms_of_service/:date HTTP/1.1 +``` + +Obtain the contents of this server's terms of service, for a specified date, if configured. + +**Returns:** [TermsOfService]({{< relref "entities/TermsOfService" >}})\ +**OAuth:** Public\ +**Version history:**\ +4.4.0 - added + +#### Request + +##### Path parameters + +:date +: {{}} String. The effective date of the terms of service. + +#### Response + +##### 200: OK + +```json +{ + "effective_date": "2025-04-15", + "effective": true, + "content": "

Foo bar newer

\n", + "succeeded_by": null +} +``` ##### 404: Not Found