mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
feat: Support Password Access for ElasticSearch (#1072)
### What problem does this PR solve? Using password authentication to access ElasticSearch is essential, especially in a production environment. This PR will enable password access support. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -28,6 +28,8 @@ class ESConnection:
|
||||
try:
|
||||
self.es = Elasticsearch(
|
||||
settings.ES["hosts"].split(","),
|
||||
basic_auth=(settings.ES["username"], settings.ES["password"]) if "username" in settings.ES and "password" in settings.ES else None,
|
||||
verify_certs=False,
|
||||
timeout=600
|
||||
)
|
||||
if self.es:
|
||||
|
||||
Reference in New Issue
Block a user