mirror of
https://github.com/plausible/analytics.git
synced 2024-10-26 10:22:34 +03:00
Add runtime config option for enabled/disabling csv imports and exports
This commit is contained in:
parent
b373c36dcc
commit
e30f202dd3
@ -287,6 +287,11 @@ secure_cookie =
|
||||
|> get_var_from_path_or_env("SECURE_COOKIE", if(is_selfhost, do: "false", else: "true"))
|
||||
|> String.to_existing_atom()
|
||||
|
||||
csv_imports_exports_enabled =
|
||||
config_dir
|
||||
|> get_var_from_path_or_env("CSV_IMPORTS_EXPORTS_ENABLED", "true")
|
||||
|> String.to_existing_atom()
|
||||
|
||||
license_key = get_var_from_path_or_env(config_dir, "LICENSE_KEY", "")
|
||||
|
||||
config :plausible,
|
||||
@ -297,7 +302,8 @@ config :plausible,
|
||||
custom_script_name: custom_script_name,
|
||||
log_failed_login_attempts: log_failed_login_attempts,
|
||||
license_key: license_key,
|
||||
persistent_cache_dir: persistent_cache_dir
|
||||
persistent_cache_dir: persistent_cache_dir,
|
||||
csv_imports_exports_enabled: csv_imports_exports_enabled
|
||||
|
||||
config :plausible, :selfhost,
|
||||
enable_email_verification: enable_email_verification,
|
||||
|
@ -49,4 +49,8 @@ defmodule Plausible do
|
||||
unquote(small_build?)
|
||||
end
|
||||
end
|
||||
|
||||
def csv_imports_exports_enabled?() do
|
||||
Application.fetch_env!(:plausible, :csv_imports_exports_enabled)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user