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.

fix: Change API key authentication failure response code from 404 to 401 (#6885)

ian093f90233522
diff --git a/api/controllers/inner_api/wraps.py b/api/controllers/inner_api/wraps.py
index 2c3c870bce5..5c37f5276f5 100644
--- a/api/controllers/inner_api/wraps.py
+++ b/api/controllers/inner_api/wraps.py
@@ -19,7 +19,7 @@ def inner_api_only(view):
# get header 'X-Inner-Api-Key'
inner_api_key = request.headers.get('X-Inner-Api-Key')
if not inner_api_key or inner_api_key != dify_config.INNER_API_KEY:
- abort(404)
+ abort(401)
return view(*args, **kwargs)