defp load_and_create(group) do
group
|> Application.get_all_env()
- |> Enum.reject(fn {k, _v} -> k in [Pleroma.Repo, :env] end)
+ |> Enum.reject(fn {k, _v} ->
+ k in [Pleroma.Repo, :env] or (group == :phoenix and k == :serve_endpoints)
+ end)
|> Enum.each(fn {key, value} ->
key = inspect(key)
{:ok, _} = Config.update_or_create(%{group: inspect(group), key: key, value: value})
group = Config.from_string(setting.group)
value = Config.from_binary(setting.value)
- :ok = Application.put_env(group, key, value)
+ if group != :phoenix and key != :serve_endpoints do
+ :ok = Application.put_env(group, key, value)
+ end
group
rescue