allow server name config

master
lza_menace 2 years ago
parent 1a72ca0e97
commit fef75d3b4e

@ -10,6 +10,7 @@ HOST = env.get("HOST", "127.0.0.1")
TEMPLATES_AUTO_RELOAD = True
QUART_ENV = env.get("QUART_ENV", "development")
SECRET_KEY = env.get("SECRET_KEY", token_urlsafe(12))
SERVER_NAME = env.get("SERVER_NAME", "http://127.0.0.1:5000")
QUART_AUTH_DURATION = int(env.get('QUART_AUTH_DURATION', 60 * 60)) # 1 hour
# LWS

@ -14,6 +14,7 @@ def create_app():
app.config["TEMPLATES_AUTO_RELOAD"] = config.TEMPLATES_AUTO_RELOAD
app.config["QUART_ENV"] = config.QUART_ENV
app.config["QUART_AUTH_DURATION"] = config.QUART_AUTH_DURATION
app.config["SERVER_NAME"] = config.SERVER_NAME
AuthManager(app)
bcrypt = Bcrypt(app)

@ -17,6 +17,7 @@ async def index():
return redirect("/setup")
lws.init(admin.view_key)
accounts = lws.list_accounts()
if 'hidden' in accounts:
del accounts["hidden"]
requests = lws.list_requests()
return await render_template(

Loading…
Cancel
Save