YueGuobin 3958279b8a
feat: add client information logging to MCP connection rejection
Add reusable utility for extracting client information from ASGI scope:
- Create gns3server/utils/request_utils.py with extract_client_info()
- Extract client IP, port, path, method, and authenticated username
- Format comprehensive log messages with client context

Benefits:
- Better observability for connection rejection events
- Reusable utility for other modules
- Consistent client logging format across codebase
- Helps diagnose timing issues during server startup

Usage:
  from gns3server.utils.request_utils import extract_client_info
  client_info = extract_client_info(scope, auth_service)
  log.warning(f"Connection rejected - Client: {client_info['host']}:{client_info['port']} ({client_info['user_info']})")
2026-06-06 22:35:43 +08:00
..
2026-05-13 00:34:05 +08:00
2026-04-04 19:55:13 +08:00
2026-05-13 00:34:05 +08:00
2024-04-22 18:51:29 +07:00
2026-05-13 00:34:05 +08:00
2022-01-19 22:28:36 +10:30
2026-06-02 00:04:50 +02:00