modified: app.py
This commit is contained in:
7
app.py
7
app.py
@@ -280,9 +280,10 @@ def store_command():
|
||||
'expires_at': expires_at.isoformat()
|
||||
}
|
||||
|
||||
# Generate URL
|
||||
base_url = request.host_url.rstrip('/')
|
||||
retrieval_url = f"{base_url}/projects/itemeditor/storage/{command_uuid}"
|
||||
# Generate URL - use HTTPS if behind proxy
|
||||
scheme = request.headers.get('X-Forwarded-Proto', 'https' if request.is_secure else 'http')
|
||||
host = request.headers.get('X-Forwarded-Host', request.host)
|
||||
retrieval_url = f"{scheme}://{host}/projects/itemeditor/storage/{command_uuid}"
|
||||
|
||||
return jsonify({
|
||||
'success': True,
|
||||
|
||||
Reference in New Issue
Block a user