-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Unused response_factory
argument of web.UrlDispatcher.add_static
/web.StaticResource
#2290
Comments
Not sure if we need support the factory.
@zemlanin @Axik what is your motivation for passing custom factory instead of using the proposed way? |
@asvetlov As I wrote in "Steps to reproduce", I've wanted to add |
Did you try just setup https://github.com/aio-libs/aiohttp-cors globally for the whole app? |
What do you mean by "globally for the whole app"? Something like this from for route in list(app.router.routes()):
cors.add(route) If so, then this snippet results in
|
I'm just a stranger passing by trying to help people. |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Long story short
Argument
response_factory
doesn't affect static responsesExpected behaviour
aiohttp should call custom class passed to
aiohttp.web.UrlDispatcher.add_static()
Actual behaviour
response_factory
value is ignoredSteps to reproduce
Your environment
aiohttp==2.2.5
The text was updated successfully, but these errors were encountered: