Increase postmark timeout

This commit is contained in:
Uku Taht 2020-12-22 15:50:08 +02:00
parent b64f9de51a
commit b7827fee6a
4 changed files with 4 additions and 2 deletions

View File

@ -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" ->

View File

@ -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" ->

View File

@ -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

View File

@ -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