diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/config.exs | 15 | ||||
-rw-r--r-- | config/test.exs | 3 |
2 files changed, 16 insertions, 2 deletions
diff --git a/config/config.exs b/config/config.exs index d743406dc..34b516e02 100644 --- a/config/config.exs +++ b/config/config.exs @@ -12,7 +12,7 @@ config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes config :pleroma, Pleroma.Captcha, enabled: false, - seconds_retained: 180, + seconds_valid: 60, method: Pleroma.Captcha.Kocaptcha config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch" @@ -54,6 +54,17 @@ config :pleroma, :uri_schemes, "xmpp" ] +websocket_config = [ + path: "/websocket", + serializer: [ + {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"}, + {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"} + ], + timeout: 60_000, + transport_log: false, + compress: false +] + # Configures the endpoint config :pleroma, Pleroma.Web.Endpoint, url: [host: "localhost"], @@ -62,6 +73,8 @@ config :pleroma, Pleroma.Web.Endpoint, {:_, [ {"/api/v1/streaming", Elixir.Pleroma.Web.MastodonAPI.WebsocketHandler, []}, + {"/socket/websocket", Phoenix.Endpoint.CowboyWebSocket, + {nil, {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}}, {:_, Plug.Adapters.Cowboy.Handler, {Pleroma.Web.Endpoint, []}} ]} ] diff --git a/config/test.exs b/config/test.exs index 51aace407..67ed4737f 100644 --- a/config/test.exs +++ b/config/test.exs @@ -9,7 +9,8 @@ config :pleroma, Pleroma.Web.Endpoint, # Disable captha for tests config :pleroma, Pleroma.Captcha, - enabled: true, + # It should not be enabled for automatic tests + enabled: false, # A fake captcha service for tests method: Pleroma.Captcha.Mock |