Fixed sub links generation
All checks were successful
Docker hub build / docker (push) Successful in 6m12s

This commit is contained in:
AB from home.homenet
2025-08-05 01:50:11 +03:00
parent 1f7953a74c
commit 56b0b160e3
2 changed files with 6 additions and 2 deletions

View File

@@ -34,6 +34,9 @@ def userPortal(request, user_hash):
recent_connections = 0
logger.warning(f"No cached statistics found for user {user.username}. Run statistics update task.")
# Determine protocol scheme
scheme = 'https' if request.is_secure() else 'http'
# Group links by server
servers_data = {}
total_links = 0
@@ -157,6 +160,7 @@ def userPortal(request, user_hash):
'recent_connections': recent_connections,
'external_address': EXTERNAL_ADDRESS,
'has_xray_servers': has_xray_servers,
'force_scheme': scheme, # Override request.scheme in template
}
logger.debug(f"Context prepared with keys: {list(context.keys())}")