You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically the problem was that /visual-classes/merge, /visual-classes/move and /visual-classes/extract routes were defined after/visual-classes/{visual_class_id}, and while aiohttp was able to handle this routing order with no problems, it appears that aiohttp-cors cannot.
That is aiohttp-cors fixes the GET for /visual-classes/{visual_class_id} and later when I try to enable CORS for /visual-classes/merge for PUT, it doesn't work, because it thinks that GET cors options have already been set for /visual-classes/{visual_class_id}.
After some debugging. The only solution was to move the more specific routes on top of the generic route. And then CORS worked beautifully.
I think this is a bug in aiohttp-cors, and it's particularly nasty because it's very silent, and when you think aiohttp routing works fine, but cors doesn't, it can be difficult to realize this.
The text was updated successfully, but these errors were encountered:
We just encountered a strange CORS bug that that we found a solution to. Our solution is this git commit:
Basically the problem was that
/visual-classes/merge
,/visual-classes/move
and/visual-classes/extract
routes were defined after/visual-classes/{visual_class_id}
, and while aiohttp was able to handle this routing order with no problems, it appears that aiohttp-cors cannot.That is aiohttp-cors fixes the
GET
for/visual-classes/{visual_class_id}
and later when I try to enable CORS for/visual-classes/merge
forPUT
, it doesn't work, because it thinks thatGET
cors options have already been set for/visual-classes/{visual_class_id}
.After some debugging. The only solution was to move the more specific routes on top of the generic route. And then CORS worked beautifully.
I think this is a bug in aiohttp-cors, and it's particularly nasty because it's very silent, and when you think aiohttp routing works fine, but cors doesn't, it can be difficult to realize this.
The text was updated successfully, but these errors were encountered: