Enhanced: Comprehensive production debugging and Nginx proxy support
Debugging Tools: - Added /debug endpoint to verify deployment and test distribution functionality - Added browser console test function: testDistributionChart() - Enhanced SocketIO settings with better transport priorities - Added comprehensive error tracking and status reporting Nginx Configuration: - Created NGINX_CONFIG.md with complete proxy setup guide - Improved WebSocket transport settings and timeouts - Better ping/pong settings for connection stability Production Compatibility: - Optimized SocketIO for proxy environments - Enhanced fallback mechanisms - Production-ready logging and error handling This should resolve proxy-related issues and provide clear diagnostic tools.
This commit is contained in:
@@ -15,8 +15,13 @@ from app.models import SimulationManager
|
||||
socketio = SocketIO(
|
||||
cors_allowed_origins="*",
|
||||
async_mode='threading',
|
||||
logger=True,
|
||||
engineio_logger=True
|
||||
logger=False, # Disable to avoid log spam in production
|
||||
engineio_logger=False,
|
||||
# Transport order: try websocket first, then polling
|
||||
transports=['websocket', 'polling'],
|
||||
# Ping settings for better connection detection
|
||||
ping_timeout=60,
|
||||
ping_interval=25
|
||||
)
|
||||
|
||||
# Global simulation manager instance
|
||||
@@ -45,7 +50,9 @@ def create_app(config_name=None):
|
||||
async_mode='threading',
|
||||
cors_allowed_origins="*",
|
||||
allow_upgrades=True,
|
||||
transports=['websocket', 'polling']
|
||||
transports=['websocket', 'polling'],
|
||||
ping_timeout=60,
|
||||
ping_interval=25
|
||||
)
|
||||
|
||||
# Register blueprints
|
||||
|
Reference in New Issue
Block a user