Open bmamouri opened 5 years ago
@bmamouri I too have the same issue. A dirty fix was to move the validation of the auth request headers to each route, making them call a common validation function. But this issue renders the aiohttp middleware component unusable with this library.
Hello, I still have this issue.
the issue is here Path : site-packages\aiohttp_cors\cors_config.py Line: 171 : assert hdrs.ACCESS_CONTROL_ALLOW_ORIGIN not in response.headers
I had to comment this line to get it working
I have an authentication middleware. In the middleware if the request method is OPTIONS I am returning the handler intact with the aim that aiohttp-cors handle the preflight request and return the correct response headers. However, the response headers are not being sent correctly by the signals.
It is quite possible that I am doing something wrong in my middleware, and the OPTIONS call need to be handled differently. This is my middleware:
I am creating the app as following:
And this is how I am setting up cors:
However, whenever I make a call I get the following error: