Open
Description
Hello, I'm not sure if there's something I'm misunderstanding, but from my experiments, it seems like django-cors-headers
is not setting CORS headers on HTTP 4XX error responses, when used with Django 3.1. I know there's been some changes to the way middleware are handled over the years. Is it possible that django-cors-headers
needs to be updated to be fully compatible with newer versions?
As an experiment, I added a process_exception()
method to CorsMiddleware
, like this:
def process_exception(self, request, exception):
return self.process_response(request, exception)
And that seems to have resolved my issue. Is this a sensible way to proceed? If so, I'm happy to put together a formal pull request.
Thanks for a useful library!
Metadata
Metadata
Assignees
Labels
No labels