respect https setting in admin ui link (#1416)

* respect https setting in admin ui link

* make format
This commit is contained in:
calle 2023-01-30 11:30:23 +01:00 committed by GitHub
parent 80a94aa9ce
commit 52e654af86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -44,7 +44,7 @@ LNBITS_DISABLED_EXTENSIONS="amilk"
LNBITS_DATA_FOLDER="./data" LNBITS_DATA_FOLDER="./data"
# LNBITS_DATABASE_URL="postgres://user:password@host:port/databasename" # LNBITS_DATABASE_URL="postgres://user:password@host:port/databasename"
LNBITS_FORCE_HTTPS=true LNBITS_FORCE_HTTPS=false
LNBITS_SERVICE_FEE="0.0" LNBITS_SERVICE_FEE="0.0"
# value in millisats # value in millisats
LNBITS_RESERVE_FEE_MIN=2000 LNBITS_RESERVE_FEE_MIN=2000

View file

@ -435,9 +435,7 @@ async def check_admin_settings():
for key, value in settings.dict(exclude_none=True).items(): for key, value in settings.dict(exclude_none=True).items():
logger.debug(f"{key}: {value}") logger.debug(f"{key}: {value}")
admin_url = ( admin_url = f"{'https' if settings.lnbits_force_https else 'http'}://{settings.host}:{settings.port}/wallet?usr={settings.super_user}"
f"http://{settings.host}:{settings.port}/wallet?usr={settings.super_user}"
)
logger.success(f"✔️ Access super user account at: {admin_url}") logger.success(f"✔️ Access super user account at: {admin_url}")
# callback for saas # callback for saas