somoncef commited on
Commit
5ee5a74
·
1 Parent(s): 46ca7ac

fea:Adding API key filtering on Predict endpoint

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -269,9 +269,9 @@ with app.app_context():
269
  # def check_rapidapi_key():
270
  # """Verify RapidAPI key for security"""
271
  # if request.path == '/predict':
272
- # rapidapi_key = request.headers.get('X-RapidAPI-Key')
273
  # if not rapidapi_key:
274
- # return jsonify({'error': 'Missing X-RapidAPI-Key header'}), 401
275
 
276
  @app.route('/predict', methods=['POST'])
277
  def predict():
 
269
  # def check_rapidapi_key():
270
  # """Verify RapidAPI key for security"""
271
  # if request.path == '/predict':
272
+ # rapidapi_key = request.headers.get('x-rapidapi-key')
273
  # if not rapidapi_key:
274
+ # return jsonify({'error': 'Missing x-rapidapi-key header'}), 401
275
 
276
  @app.route('/predict', methods=['POST'])
277
  def predict():