1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-04 00:17:06 +00:00

applied optimization to region fetching

This commit is contained in:
Steve Hay 2022-09-12 18:34:09 -04:00
parent 8c1a7b7735
commit 87ecac8592

View File

@ -123,7 +123,8 @@ def index():
import boto3.s3
from urllib.parse import urlparse
backup_s3_hosts = [(r, urlparse(boto3.client('s3', region_name=r).meta.endpoint_url).netloc) for r in boto3.session.Session().get_available_regions('s3')]
backup_s3_hosts = [(r, f"s3.{r}.amazonaws.com") for r in boto3.session.Session().get_available_regions('s3')]
return render_template('index.html',
hostname=env['PRIMARY_HOSTNAME'],