Skip to content

Allow blank (but not None) static_url_path #51

Closed
baztian opened this Issue Feb 15, 2013 · 2 comments

3 participants

@baztian
baztian commented Feb 15, 2013

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.

@harvimt
harvimt commented May 21, 2013

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.

@maxcountryman
Owner

@harvimt that's probably fine. Try it with the new test suite and make sure nothing obvious is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.