Skip to content

feature: added AllowRequestedCORSMiddleware

Calum Mackervoy requested to merge cors-middleware into master

What

added middleware which returns the HTTP_ORIGIN of the request as an Allowed origin for CORS. Replaces the use of the ViewSet dispatch for this purpose

Why

In a federated/Solid context, we can't use CORS. We always want developers to expose their views to the origin of the request

@balessan I tested and this returns the necessary headers on non-DjangoLDP views e.g. auth/logout/

Edited by Calum Mackervoy

Merge request reports