class SecuredStaticFlask(Flask):

    def send_static_file(self, filename):
        if user.is_authenticated():
            return super(SecuredStaticFlask, self).send_static_file(filename)
Secure static files with flask