summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/config.exs21
-rw-r--r--config/config.md14
-rw-r--r--config/dev.exs1
-rw-r--r--config/test.exs9
4 files changed, 41 insertions, 4 deletions
diff --git a/config/config.exs b/config/config.exs
index 1777a54c0..65d7346de 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -10,6 +10,13 @@ config :pleroma, ecto_repos: [Pleroma.Repo]
config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes
+config :pleroma, Pleroma.Captcha,
+ enabled: false,
+ seconds_retained: 180,
+ method: Pleroma.Captcha.Kocaptcha
+
+config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
+
# Upload configuration
config :pleroma, Pleroma.Upload,
uploader: Pleroma.Uploaders.Local,
@@ -50,6 +57,15 @@ config :pleroma, :uri_schemes,
# Configures the endpoint
config :pleroma, Pleroma.Web.Endpoint,
url: [host: "localhost"],
+ http: [
+ dispatch: [
+ {:_,
+ [
+ {"/api/v1/streaming", Elixir.Pleroma.Web.MastodonAPI.WebsocketHandler, []},
+ {:_, Plug.Adapters.Cowboy.Handler, {Pleroma.Web.Endpoint, []}}
+ ]}
+ ]
+ ],
protocol: "https",
secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
signing_salt: "CqaoopA2",
@@ -94,6 +110,7 @@ config :pleroma, :instance,
public: true,
quarantined_instances: [],
managed_config: true,
+ static_dir: "instance/static/",
allowed_post_formats: [
"text/plain",
"text/html",
@@ -120,8 +137,8 @@ config :pleroma, :fe,
logo_mask: true,
logo_margin: "0.1em",
background: "/static/aurora_borealis.jpg",
- redirect_root_no_login: "/main/all",
- redirect_root_login: "/main/friends",
+ redirect_root_no_login: "/~/main/all",
+ redirect_root_login: "/~/main/friends",
show_instance_panel: true,
scope_options_enabled: false,
formatting_options_enabled: false,
diff --git a/config/config.md b/config/config.md
index 8282eab14..edabd6e0f 100644
--- a/config/config.md
+++ b/config/config.md
@@ -7,7 +7,7 @@ If you run Pleroma with ``MIX_ENV=prod`` the file is ``prod.secret.exs``, otherw
* `uploader`: Select which `Pleroma.Uploaders` to use
* `filters`: List of `Pleroma.Upload.Filter` to use.
* `base_url`: The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host.
-* `proxy_remote`: If you're using a remote uploader, Pleroma will proxy media requests instead of redirecting to it.
+* `proxy_remote`: If you\'re using a remote uploader, Pleroma will proxy media requests instead of redirecting to it.
* `proxy_opts`: Proxy options, see `Pleroma.ReverseProxy` documentation.
Note: `strip_exif` has been replaced by `Pleroma.Upload.Filter.Mogrify`.
@@ -163,3 +163,15 @@ Web Push Notifications configuration. You can use the mix task `mix web_push.gen
* ``subject``: a mailto link for the administrative contact. It’s best if this email is not a personal email address, but rather a group email so that if a person leaves an organization, is unavailable for an extended period, or otherwise can’t respond, someone else on the list can.
* ``public_key``: VAPID public key
* ``private_key``: VAPID private key
+
+## Pleroma.Captcha
+* `enabled`: Whether the captcha should be shown on registration
+* `method`: The method/service to use for captcha
+* `seconds_retained`: The time in seconds for which the captcha is valid (stored in the cache)
+
+### Pleroma.Captcha.Kocaptcha
+Kocaptcha is a very simple captcha service with a single API endpoint,
+the source code is here: https://github.com/koto-bank/kocaptcha. The default endpoint
+`https://captcha.kotobank.ch` is hosted by the developer.
+
+* `endpoint`: the kocaptcha endpoint to use \ No newline at end of file
diff --git a/config/dev.exs b/config/dev.exs
index 080a2f8db..8f89aa03c 100644
--- a/config/dev.exs
+++ b/config/dev.exs
@@ -12,6 +12,7 @@ config :pleroma, Pleroma.Web.Endpoint,
protocol_options: [max_request_line_length: 8192, max_header_value_length: 8192]
],
protocol: "http",
+ secure_cookie_flag: false,
debug_errors: true,
code_reloader: true,
check_origin: false,
diff --git a/config/test.exs b/config/test.exs
index 5c6acfead..51aace407 100644
--- a/config/test.exs
+++ b/config/test.exs
@@ -4,7 +4,14 @@ use Mix.Config
# you can enable the server option below.
config :pleroma, Pleroma.Web.Endpoint,
http: [port: 4001],
- server: false
+ url: [port: 4001],
+ server: true
+
+# Disable captha for tests
+config :pleroma, Pleroma.Captcha,
+ enabled: true,
+ # A fake captcha service for tests
+ method: Pleroma.Captcha.Mock
# Print only warnings and errors during test
config :logger, level: :warn