Add debug logging for API key validation
- Log first 20 chars of API key being checked - Helps debug 'API key not found in settings' errors - Shows which token is being validated
This commit is contained in:
parent
1169b872cf
commit
a60c48276d
|
|
@ -82,6 +82,9 @@ def validate_access_token(token, scan_id):
|
||||||
try:
|
try:
|
||||||
from .models import AIScannerSettings, ScanHistory
|
from .models import AIScannerSettings, ScanHistory
|
||||||
|
|
||||||
|
# Debug: log the token being checked
|
||||||
|
logging.writeToFile(f'[API] Checking API key: {token[:20]}... for scan {scan_id}')
|
||||||
|
|
||||||
# Find API key in settings
|
# Find API key in settings
|
||||||
scanner_settings = AIScannerSettings.objects.get(
|
scanner_settings = AIScannerSettings.objects.get(
|
||||||
api_key=token
|
api_key=token
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue