label: "Build directory",
type: :string,
description: "The directory inside the zip file "
+ },
+ %{
+ key: "custom-http-headers",
+ label: "Custom HTTP headers",
+ type: {:list, :string},
+ description: "The custom HTTP headers for the frontend"
}
]
%{
key: :proxy_remote,
type: :boolean,
- description:
- "If enabled, requests to media stored using a remote uploader will be proxied instead of being redirected"
- },
- %{
- key: :proxy_opts,
- label: "Proxy Options",
- type: :keyword,
- description: "Options for Pleroma.ReverseProxy",
- suggestions: [
- redirect_on_failure: false,
- max_body_length: 25 * 1_048_576,
- http: [
- follow_redirect: true,
- pool: :media
- ]
- ],
- children: [
- %{
- key: :redirect_on_failure,
- type: :boolean,
- description:
- "Redirects the client to the real remote URL if there's any HTTP errors. " <>
- "Any error during body processing will not be redirected as the response is chunked."
- },
- %{
- key: :max_body_length,
- type: :integer,
- description:
- "Limits the content length to be approximately the " <>
- "specified length. It is validated with the `content-length` header and also verified when proxying."
- },
- %{
- key: :http,
- label: "HTTP",
- type: :keyword,
- description: "HTTP options",
- children: [
- %{
- key: :adapter,
- type: :keyword,
- description: "Adapter specific options",
- children: [
- %{
- key: :ssl_options,
- type: :keyword,
- label: "SSL Options",
- description: "SSL options for HTTP adapter",
- children: [
- %{
- key: :versions,
- type: {:list, :atom},
- description: "List of TLS versions to use",
- suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
- }
- ]
- }
- ]
- },
- %{
- key: :proxy_url,
- label: "Proxy URL",
- type: [:string, :tuple],
- description: "Proxy URL",
- suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}]
- }
- ]
- }
- ]
+ description: """
+ Proxy requests to the remote uploader.\n
+ Useful if media upload endpoint is not internet accessible.
+ """
},
%{
key: :filename_display_max_length,
description: "S3 bucket namespace",
suggestions: ["pleroma"]
},
- %{
- key: :public_endpoint,
- type: :string,
- description: "S3 endpoint",
- suggestions: ["https://s3.amazonaws.com"]
- },
%{
key: :truncated_namespace,
type: :string,
description:
"If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <>
- " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint."
+ " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in Upload base_url."
},
%{
key: :streaming_enabled,
%{
key: :enabled,
type: :boolean,
- description: "Enables proxying of remote media to the instance's proxy"
+ description: "Enables proxying of remote media via the instance's proxy"
},
%{
key: :base_url,
},
%{
key: :proxy_opts,
- label: "Proxy Options",
+ label: "Advanced MediaProxy Options",
type: :keyword,
- description: "Options for Pleroma.ReverseProxy",
+ description: "Internal Pleroma.ReverseProxy settings",
suggestions: [
redirect_on_failure: false,
max_body_length: 25 * 1_048_576,
- max_read_duration: 30_000,
- http: [
- follow_redirect: true,
- pool: :media
- ]
+ max_read_duration: 30_000
],
children: [
%{
key: :redirect_on_failure,
type: :boolean,
- description:
- "Redirects the client to the real remote URL if there's any HTTP errors. " <>
- "Any error during body processing will not be redirected as the response is chunked."
+ description: """
+ Redirects the client to the origin server upon encountering HTTP errors.\n
+ Note that files larger than Max Body Length will trigger an error. (e.g., Peertube videos)\n\n
+ **WARNING:** This setting will allow larger files to be accessed, but exposes the\n
+ IP addresses of your users to the other servers, bypassing the MediaProxy.
+ """
},
%{
key: :max_body_length,
type: :integer,
- description:
- "Limits the content length to be approximately the " <>
- "specified length. It is validated with the `content-length` header and also verified when proxying."
+ description: "Maximum file size allowed through the Pleroma MediaProxy cache."
},
%{
key: :max_read_duration,
type: :integer,
- description: "Timeout (in milliseconds) of GET request to remote URI."
- },
- %{
- key: :http,
- label: "HTTP",
- type: :keyword,
- description: "HTTP options",
- children: [
- %{
- key: :adapter,
- type: :keyword,
- description: "Adapter specific options",
- children: [
- %{
- key: :ssl_options,
- type: :keyword,
- label: "SSL Options",
- description: "SSL options for HTTP adapter",
- children: [
- %{
- key: :versions,
- type: {:list, :atom},
- description: "List of TLS version to use",
- suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
- }
- ]
- }
- ]
- },
- %{
- key: :proxy_url,
- label: "Proxy URL",
- type: [:string, :tuple],
- description: "Proxy URL",
- suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}]
- }
- ]
+ description: "Timeout (in milliseconds) of GET request to the remote URI."
}
]
},
%{
key: :whitelist,
type: {:list, :string},
- description: "List of hosts with scheme to bypass the mediaproxy",
+ description: "List of hosts with scheme to bypass the MediaProxy",
suggestions: ["http://example.com"]
}
]
group: :pleroma,
key: Pleroma.Web.MediaProxy.Invalidation.Script,
type: :group,
- description: "Script invalidate settings",
+ description: "Invalidation script settings",
children: [
%{
key: :script_path,
type: :string,
- description: "Path to shell script. Which will run purge cache.",
+ description: "Path to executable script which will purge cached items.",
suggestions: ["./installation/nginx-cache-purge.sh.example"]
+ },
+ %{
+ key: :url_format,
+ type: :string,
+ description:
+ "Optional URL format preprocessing. Only required for Apache's htcacheclean.",
+ suggestions: [":htcacheclean"]
}
]
},
group: :pleroma,
key: Oban,
type: :group,
- description: """
- [Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.
-
- Note: if you are running PostgreSQL in [`silent_mode`](https://postgresqlco.nf/en/doc/param/silent_mode?version=9.1),
- it's advised to set [`log_destination`](https://postgresqlco.nf/en/doc/param/log_destination?version=9.1) to `syslog`,
- otherwise `postmaster.log` file may grow because of "you don't own a lock of type ShareLock" warnings
- (see https://github.com/sorentwo/oban/issues/52).
- """,
+ description:
+ "[Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.",
children: [
%{
key: :log,
type: :string,
description: "S3 host",
suggestions: ["s3.eu-central-1.amazonaws.com"]
+ },
+ %{
+ key: :region,
+ type: :string,
+ description: "S3 region (for AWS)",
+ suggestions: ["us-east-1"]
}
]
},
suggestions: [:text, :protobuf]
}
]
+ },
+ %{
+ group: :pleroma,
+ key: ConcurrentLimiter,
+ type: :group,
+ description: "Limits configuration for background tasks.",
+ children: [
+ %{
+ key: Pleroma.Web.RichMedia.Helpers,
+ type: :keyword,
+ description: "Concurrent limits configuration for getting RichMedia for activities.",
+ suggestions: [max_running: 5, max_waiting: 5],
+ children: [
+ %{
+ key: :max_running,
+ type: :integer,
+ description: "Max running concurrently jobs.",
+ suggestion: [5]
+ },
+ %{
+ key: :max_waiting,
+ type: :integer,
+ description: "Max waiting jobs.",
+ suggestion: [5]
+ }
+ ]
+ },
+ %{
+ key: Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy,
+ type: :keyword,
+ description: "Concurrent limits configuration for MediaProxyWarmingPolicy.",
+ suggestions: [max_running: 5, max_waiting: 5],
+ children: [
+ %{
+ key: :max_running,
+ type: :integer,
+ description: "Max running concurrently jobs.",
+ suggestion: [5]
+ },
+ %{
+ key: :max_waiting,
+ type: :integer,
+ description: "Max waiting jobs.",
+ suggestion: [5]
+ }
+ ]
+ }
+ ]
}
]