Parcourir la source

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

tags/0.6.16
ian il y a 1 an
Parent
révision
093f902335
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1
    1
      api/controllers/inner_api/wraps.py

+ 1
- 1
api/controllers/inner_api/wraps.py Voir le fichier

@@ -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)


Chargement…
Annuler
Enregistrer