-
Notifications
You must be signed in to change notification settings - Fork 22
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
Missing CORS headers in response with latest sanic 22.9.0 #64
Comments
Hi @philipnbbc Sanic-CORS plugin does not yet work with the recently released Sanic v22.9. It is common when new versions of Sanic come out that it can take several weeks for third-party plugins to updated to include compatibility with the new version. I am the only developer on this project and have not had a chance to look into Sanic v22.9 yet, or the changes that would be required to add compatibility to Sanic-CORS. |
Thanks @ashleysommer, I appreciate all your efforts developing and maintaining sanic-cors. It's not an immediate problem for us and we can pin to the previous Sanic version. |
@philipnbbc |
Tested and it works. Thanks! |
It appears that sanic_cors (2.1.0) with the latest version of sanic (22.9.0) fails to add CORS headers when combined with other response middleware .
The test code provided below demonstrates the issue.
Run with
TEST_WITH_OTHER_MIDDLEWARE = False
andcurl -i http://127.0.0.1:8000
returnsAccess-Control-Allow-Origin: *
. Run it withTEST_WITH_OTHER_MIDDLEWARE = True
and that header is not returned.Installing sanic<22.9 results in the CORS header being returned in both cases.
The text was updated successfully, but these errors were encountered: