修复商品风险多店铺问题
This commit is contained in:
@@ -195,10 +195,13 @@ def proxy(path):
|
||||
if key.lower() in ['host', 'content-length', 'connection']:
|
||||
continue
|
||||
headers[key] = value
|
||||
ignore_url = [f"{JAVA_API_BASE}/api/delete-brand/tasks/batch",
|
||||
f"{JAVA_API_BASE}/api/delete-brand/history",
|
||||
f"{JAVA_API_BASE}/api/product-risk-resolve/tasks/batch",
|
||||
]
|
||||
ignore_url = [f"{JAVA_API_BASE}/api/delete-brand/tasks/batch",
|
||||
f"{JAVA_API_BASE}/api/delete-brand/tasks/progress/batch",
|
||||
f"{JAVA_API_BASE}/api/delete-brand/history",
|
||||
f"{JAVA_API_BASE}/api/product-risk-resolve/tasks/batch",
|
||||
f"{JAVA_API_BASE}/api/product-risk-resolve/tasks/progress/batch",
|
||||
]
|
||||
proxy_timeout = 180 if target_url.endswith("/api/delete-brand/run") else 30
|
||||
if target_url not in ignore_url:
|
||||
try:
|
||||
print("=============================")
|
||||
@@ -219,7 +222,7 @@ def proxy(path):
|
||||
data=request.get_data() if request.get_data() else None,
|
||||
cookies=request.cookies,
|
||||
stream=True, # 启用流式传输
|
||||
timeout=30
|
||||
timeout=proxy_timeout
|
||||
)
|
||||
|
||||
# 流式响应
|
||||
|
||||
Reference in New Issue
Block a user