jpvanhal / flask-basicauth

HTTP basic access authentication for Flask.
https://flask-basicauth.readthedocs.io/
Other
85 stars 27 forks source link

Handle Protecting Static Files #6

Open cancan101 opened 8 years ago

cancan101 commented 8 years ago

something like this works, though it needs access to the BasicAuth instance.

    class SecuredStaticFlask(Flask):
        @basic_auth.required
        def send_static_file(self, filename):
            return super(SecuredStaticFlask, self).send_static_file(filename)