I wanted to serve my static files form root “/” and not “/static”. Therefore my code look like that:
app = Flask(name, static_url_path='')
Unfortunately _load_user() sets the anonymous user for paths starting with static_url_path. In my case every url starts with static_url_path and I'm not able to access any of my restricted pages.
is there any reason we can't just ditch the static check? or am I totally missing something.
It seems like the static files will be served by werkzeug (with static file middleware) or the server (nginx, apache, etc.) and never even be seen by flask. or if there are static files that flask sees, maybe they need to be restricted ('coz they're uploaded files or whatever).
It just seems like a bad optimization.
@harvimt that's probably fine. Try it with the new test suite and make sure nothing obvious is broken.
removing the static check altogether, fixes #51