general03 / flask-autoindex

Generates index page like mod_autoindex
https://flask-autoindex.readthedocs.io
MIT License
114 stars 34 forks source link

Flask-login for every paths #52

Closed francoisihry closed 4 years ago

francoisihry commented 4 years ago

Hi,

I need to protect the access to my flask server with flask-login.

This is done by adding @login_required to the path I need to protect. Example:

@app.route("/my/path")
@login_required
def test():
    return 'hello'

With flask-autoindex the paths are dynamic, how can I force the user to login for every path ?

general03 commented 4 years ago

Hello,

Why do not want to use @login_required decorator ?

general03 commented 4 years ago

Without answer I close this issue