Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Increase postmark timeout

Uku Tahtb7827fee6aea
diff --git a/config/config.exs b/config/config.exs
index edddcbc646..91c91649f8 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -156,6 +156,7 @@ case mailer_adapter do
"Bamboo.PostmarkAdapter" ->
config :plausible, Plausible.Mailer,
adapter: :"Elixir.#{mailer_adapter}",
+ request_options: [recv_timeout: 10_000],
api_key: System.get_env("POSTMARK_API_KEY")
"Bamboo.SMTPAdapter" ->
diff --git a/config/releases.exs b/config/releases.exs
index 78fa2f57c2..d3752d635e 100644
--- a/config/releases.exs
+++ b/config/releases.exs
@@ -106,6 +106,7 @@ case mailer_adapter do
"Bamboo.PostmarkAdapter" ->
config :plausible, Plausible.Mailer,
adapter: :"Elixir.#{mailer_adapter}",
+ request_options: [recv_timeout: 10_000],
api_key: System.get_env("POSTMARK_API_KEY")
"Bamboo.SMTPAdapter" ->
diff --git a/lib/plausible_web/controllers/auth_controller.ex b/lib/plausible_web/controllers/auth_controller.ex
index 915e46b0d5..2408c6224b 100644
--- a/lib/plausible_web/controllers/auth_controller.ex
+++ b/lib/plausible_web/controllers/auth_controller.ex
@@ -8,7 +8,7 @@ defmodule PlausibleWeb.AuthController do
when action in [:register_form, :register, :login_form, :login]
plug PlausibleWeb.RequireAccountPlug
- when action in [:user_settings, :save_settings, :delete_me, :password_form, :set_password]
+ when action in [:user_settings, :save_settings, :delete_me, :password_form, :set_password, :activate_form]
def register_form(conn, _params) do
if Keyword.fetch!(Application.get_env(:plausible, :selfhost), :disable_registration) do
diff --git a/lib/plausible_web/plugs/require_account.ex b/lib/plausible_web/plugs/require_account.ex
index 250bcce8dd..ee0c6ebdbc 100644
--- a/lib/plausible_web/plugs/require_account.ex
+++ b/lib/plausible_web/plugs/require_account.ex
@@ -14,7 +14,7 @@ defmodule PlausibleWeb.RequireAccountPlug do
|> Phoenix.Controller.redirect(to: "/login")
|> halt
- not user.email_verified ->
+ not user.email_verified and conn.path_info != ["activate"] ->
conn
|> Phoenix.Controller.redirect(to: "/activate")
|> halt