RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Feat: location rule for http (#10901)
Lynn061d8f78e531
diff --git a/docker/nginx/ragflow.conf b/docker/nginx/ragflow.confindex 8f58c9a304..a060982762 100644--- a/docker/nginx/ragflow.conf+++ b/docker/nginx/ragflow.conf@@ -10,6 +10,11 @@ server {gzip_vary on;gzip_disable "MSIE [1-6]\.";+ location ~ ^/api/v1/admin {+ proxy_pass http://localhost:9381;+ include proxy.conf;+ }+location ~ ^/(v1|api) {proxy_pass http://localhost:9380;include proxy.conf;diff --git a/rag/flow/parser/parser.py b/rag/flow/parser/parser.pyindex 6e55a629e9..d67253d881 100644--- a/rag/flow/parser/parser.py+++ b/rag/flow/parser/parser.py@@ -464,14 +464,27 @@ class Parser(ProcessBase):if "body" in target_fields:body_text, body_html = [], []def _add_content(m, content_type):+ def _decode_payload(payload, charset, target_list):+ try:+ target_list.append(payload.decode(charset))+ except (UnicodeDecodeError, LookupError):+ for enc in ["utf-8", "gb2312", "gbk", "gb18030", "latin1"]:+ try:+ target_list.append(payload.decode(enc))+ break+ except UnicodeDecodeError:+ continue+ else:+ target_list.append(payload.decode("utf-8", errors="ignore"))+if content_type == "text/plain":- body_text.append(- m.get_payload(decode=True).decode(m.get_content_charset())- )+ payload = msg.get_payload(decode=True)+ charset = msg.get_content_charset() or "utf-8"+ _decode_payload(payload, charset, body_text)elif content_type == "text/html":- body_html.append(- m.get_payload(decode=True).decode(m.get_content_charset())- )+ payload = msg.get_payload(decode=True)+ charset = msg.get_content_charset() or "utf-8"+ _decode_payload(payload, charset, body_html)elif "multipart" in content_type:if m.is_multipart():for part in m.iter_parts():