mirror of
https://github.com/swizzin/swizzin_dashboard.git
synced 2024-09-20 06:46:08 +08:00
Reload htpasswd before all requests
This commit is contained in:
parent
bb68437ea8
commit
97cefd3435
|
@ -127,10 +127,9 @@ def io_wait(app):
|
|||
@app.before_request
|
||||
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
|
||||
#def apply_headers(response):
|
||||
|
|
Loading…
Reference in a new issue