Reload htpasswd before all requests

This commit is contained in:
liaralabs 2021-11-26 17:39:51 -08:00
parent bb68437ea8
commit 97cefd3435

View file

@ -127,9 +127,8 @@ def io_wait(app):
@app.before_request @app.before_request
def reload_htpasswd(): def reload_htpasswd():
""" """
This function will run before every load of the index. It will ensure the htpasswd file is current. This function ensures htpasswd is reloaded and up-to-date before every request.
""" """
if flask.request.endpoint == 'index':
htpasswd.load_users(app) htpasswd.load_users(app)
#@app.after_request #@app.after_request