- Fix packaging to not install on Python 3.8.
- Make the library compatible with aiohttp 3.9+ and Python 3.9+
- Make web view check implicit and type based (#159)
- Disable Python 3.4 support (#156)
- Support aiohttp 3.0+ (#155)
- Support aiohttp views by
CorsViewMixin(#145)
- Fix
typingbeing installed on Python 3.6.
- Fix tests compatibility with
aiohttp2.0. This release and release v0.5.0 should work onaiohttp2.0.
- Enforce
aiohttpversion to be less than 2.0. Neweraiohttpreleases will be supported in the next release.
- Fix compatibility with
aiohttp1.1
Fixed support with new Resources objects introduced in
aiohttp0.21.0. Minimum supported version ofaiohttpis 0.21.4 now.New Resources objects are supported. You can specify default configuration for a Resource and use
allow_methodsto explicitly list allowed methods (or*for all HTTP methods):# Allow POST and PUT requests from "http://client.example.org" origin. hello_resource = cors.add(app.router.add_resource("/hello"), { "http://client.example.org": aiohttp_cors.ResourceOptions( allow_methods=["POST", "PUT"]), }) # No need to add POST and PUT routes into CORS configuration object. hello_resource.add_route("POST", handler_post) hello_resource.add_route("PUT", handler_put) # Still you can add additional methods to CORS configuration object: cors.add(hello_resource.add_route("DELETE", handler_delete))
AbstractRouterAdapterwas completely rewritten to be more Router agnostic.
- Rename
UrlDistatcherRouterAdaptertoUrlDispatcherRouterAdapter. - Set maximum supported
aiohttpversion to0.20.2, see bug #30 for details.
- Move ABCs from
aiohttp_cors.router_adaptertoaiohttp_cors.abc. - Rename
RouterAdaptertoAbstractRouterAdapter. - Fix bug with configuring CORS for named routes.
- Initial release.