diff --git a/config/config.exs b/config/config.exs --- a/config/config.exs +++ b/config/config.exs @@ -7,7 +7,9 @@ # General application configuration config :kolab_chat, - ecto_repos: [KolabChat.Repo] + ecto_repos: [KolabChat.Repo], + salts: [session_signing: "M7HpCp6W", + session_encryption: nil] # Configures the endpoint config :kolab_chat, KolabChat.Endpoint, diff --git a/lib/kolab_chat/endpoint.ex b/lib/kolab_chat/endpoint.ex --- a/lib/kolab_chat/endpoint.ex +++ b/lib/kolab_chat/endpoint.ex @@ -36,7 +36,8 @@ plug Plug.Session, store: :cookie, key: "_kolab_chat_key", - signing_salt: "M7HpCp6W" + signing_salt: Keyword.get(Application.get_env(:kolab_chat, :salts), :session_signing), + encryption_salt: Keyword.get(Application.get_env(:kolab_chat, :salts), :session_encryption) plug KolabChat.Router end