mirror of
https://github.com/house-of-vanity/OutFleet.git
synced 2025-08-21 14:37:16 +00:00
Fixed sub links generation
All checks were successful
Docker hub build / docker (push) Successful in 6m12s
All checks were successful
Docker hub build / docker (push) Successful in 6m12s
This commit is contained in:
@@ -482,8 +482,8 @@
|
|||||||
One link for all your Xray protocols (VLESS, VMess, Trojan)
|
One link for all your Xray protocols (VLESS, VMess, Trojan)
|
||||||
</p>
|
</p>
|
||||||
<div class="link-url" style="margin-bottom: 0;">
|
<div class="link-url" style="margin-bottom: 0;">
|
||||||
{% url 'xray_subscription' user_links.0.link as xray_url %}{{ request.scheme }}://{{ request.get_host }}{{ xray_url }}
|
{% url 'xray_subscription' user_links.0.link as xray_url %}{{ force_scheme|default:request.scheme }}://{{ request.get_host }}{{ xray_url }}
|
||||||
<button class="copy-btn" onclick="copyToClipboard('{{ request.scheme }}://{{ request.get_host }}{{ xray_url }}')">Copy</button>
|
<button class="copy-btn" onclick="copyToClipboard('{{ force_scheme|default:request.scheme }}://{{ request.get_host }}{{ xray_url }}')">Copy</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@@ -34,6 +34,9 @@ def userPortal(request, user_hash):
|
|||||||
recent_connections = 0
|
recent_connections = 0
|
||||||
logger.warning(f"No cached statistics found for user {user.username}. Run statistics update task.")
|
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
|
# Group links by server
|
||||||
servers_data = {}
|
servers_data = {}
|
||||||
total_links = 0
|
total_links = 0
|
||||||
@@ -157,6 +160,7 @@ def userPortal(request, user_hash):
|
|||||||
'recent_connections': recent_connections,
|
'recent_connections': recent_connections,
|
||||||
'external_address': EXTERNAL_ADDRESS,
|
'external_address': EXTERNAL_ADDRESS,
|
||||||
'has_xray_servers': has_xray_servers,
|
'has_xray_servers': has_xray_servers,
|
||||||
|
'force_scheme': scheme, # Override request.scheme in template
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug(f"Context prepared with keys: {list(context.keys())}")
|
logger.debug(f"Context prepared with keys: {list(context.keys())}")
|
||||||
|
Reference in New Issue
Block a user