mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 18:35:58 +08:00
fix: Change API key authentication failure response code from 404 to 401 (#6885)
This commit is contained in:
parent
104c797dd0
commit
093f902335
@ -19,7 +19,7 @@ def inner_api_only(view):
|
|||||||
# get header 'X-Inner-Api-Key'
|
# get header 'X-Inner-Api-Key'
|
||||||
inner_api_key = request.headers.get('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:
|
if not inner_api_key or inner_api_key != dify_config.INNER_API_KEY:
|
||||||
abort(404)
|
abort(401)
|
||||||
|
|
||||||
return view(*args, **kwargs)
|
return view(*args, **kwargs)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user