-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Decorators not applied to Static Files #1953
Comments
Hi @digitalkaoz This might be intentional, but I doubt it. I'll add a test for it in our test suite, and try to see if there is a clean way to fix it without introducing any breakage or performance decrease here. |
This allows blueprint registration to add the bp's static routes to its list of own routes. So now blueprint middlewares will apply to a blueprint's static file routes. Fixes sanic-org#1953
@ashleysommer lovely! |
This allows blueprint registration to add the bp's static routes to its list of own routes. So now blueprint middlewares will apply to a blueprint's static file routes. Fixes #1953
Describe the bug
decorators cannot be applied to static files serving. My use-case here is serving auto-generated docs through the application itself while requesting a valid Basic-Authentication for the static files.
Code snippet
this works perfectly fine for e.g. the sanic-swagger blueprint.
Expected behavior
the blueprint middleware is also applied when serving the static files
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: