A Sanic extension for handling Cross Origin Resource Sharing (CORS), making cross-origin AJAX possible. Based on flask-cors by Cory Dolphin.
Quick fix for new middleware-registry behaviour on Sanic v22.9.0, fixes #64 Vary 'Origin' header will be added to any existing Vary string on response, fixes #62
Test fix for sanic v22.9
Fix compatibility with sanic-ext >= 22.6.0 (fixes #63) Replace distutils with packaging, (fixes #61)
Compatibility with Sanic v21.12, remove usage of Sanic-Plugin-Toolkit Simplified decorator code Update examples update readme update changelog bump copyright years
Fix compat with Sanic v21.9.0+ Update sptk to 1.2.0
Fixes another issue introduced with Sanic 19.12, where automatic_options cannot work when the router is run before the Sanic-CORS middleware
Changed automatic_options
to default to True when used in extension mode. (It was already default True in @decorator
mode).