hook the firefox profile download page to the mirror system

This commit is contained in:
zab2
2019-01-17 16:51:13 +00:00
parent 3017daf5ee
commit 2f93534840
4 changed files with 38 additions and 9 deletions

View File

@@ -68,7 +68,12 @@ def downloads_debian():
# Firefox-specific page
def downloads_firefox():
return render_template('downloads/firefox.html')
# TODO: read mirror list or list of available files
if request.headers.get('X-I2P-Desthash') and not request.headers.get('X-Forwarded-Server'):
def_mirror = DEFAULT_I2P_MIRROR
else:
def_mirror = DEFAULT_MIRROR
return render_template('downloads/firefox.html', def_mirror=def_mirror)
# Specific file downloader
def downloads_select(version, file):