I am building a flask application, and I want it to serve some static files only if the user is authenticated. It’s a very low-traffic application (for internal use only). How would I go about this? One thing I was thinking of is using serve_static(), and putting that behind an authentication check but that uses the static directory which flask already serves content from.
Share
Simply subclass
flask.Flaskand override thesend_static_filemethod:See also the definition of
send_static_fileand following