Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat: introduce a new environment variable that suppose to disable Scarf analytics (#11179)

Ethan0f1133729f71
diff --git a/api/.env.example b/api/.env.example
index f8a28125638..562ed970e06 100644
--- a/api/.env.example
+++ b/api/.env.example
@@ -329,6 +329,7 @@ NOTION_INTERNAL_SECRET=you-internal-secret
ETL_TYPE=dify
UNSTRUCTURED_API_URL=
UNSTRUCTURED_API_KEY=
+SCARF_NO_ANALYTICS=true
#ssrf
SSRF_PROXY_HTTP_URL=
diff --git a/api/configs/feature/__init__.py b/api/configs/feature/__init__.py
index 99f86be12eb..572f91ad2e7 100644
--- a/api/configs/feature/__init__.py
+++ b/api/configs/feature/__init__.py
@@ -585,6 +585,11 @@ class RagEtlConfig(BaseSettings):
default=None,
)
+ SCARF_NO_ANALYTICS: Optional[str] = Field(
+ description="This is about whether to disable Scarf analytics in Unstructured library.",
+ default="false",
+ )
+
class DataSetConfig(BaseSettings):
"""
diff --git a/docker/.env.example b/docker/.env.example
index 50dc56a5c96..3be33f6338e 100644
--- a/docker/.env.example
+++ b/docker/.env.example
@@ -579,6 +579,7 @@ ETL_TYPE=dify
# For example: http://unstructured:8000/general/v0/general
UNSTRUCTURED_API_URL=
UNSTRUCTURED_API_KEY=
+SCARF_NO_ANALYTICS=true
# ------------------------------
# Model Configuration