mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-25 08:26:22 +02:00
fix key check in agents,copilot
This commit is contained in:
parent
3d13471723
commit
b0f38b4e4e
2 changed files with 4 additions and 2 deletions
|
|
@ -34,7 +34,8 @@ def require_api_key(f):
|
|||
return jsonify({'error': 'Missing or invalid authorization header'}), 401
|
||||
|
||||
token = auth_header.split('Bearer ')[1]
|
||||
if token != os.environ.get('API_KEY', 'test'):
|
||||
actual = os.environ.get('API_KEY', '').strip()
|
||||
if actual and token != actual:
|
||||
return jsonify({'error': 'Invalid API key'}), 403
|
||||
|
||||
return f(*args, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue