Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow blank (but not None) static_url_path #51

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

Allow blank (but not None) static_url_path #51

baztian opened this issue Feb 15, 2013 · 2 comments

Comments

@baztian
Copy link

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
Copy link

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
Copy link
Owner

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

@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants