From c878c736e1eac5357e4f18bc266d60206b6b1616 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste <bleme@pm.me> Date: Thu, 2 May 2019 12:42:45 +0200 Subject: [PATCH] update: ldp resource must accept header authorization --- djangoldp/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/djangoldp/views.py b/djangoldp/views.py index eb7cfbda..c21bd1f7 100644 --- a/djangoldp/views.py +++ b/djangoldp/views.py @@ -135,8 +135,8 @@ class LDPViewSet(LDPViewSetGenerator): def dispatch(self, request, *args, **kwargs): response = super(LDPViewSet, self).dispatch(request, *args, **kwargs) response["Access-Control-Allow-Origin"] = request.META.get('HTTP_ORIGIN') - response["Access-Control-Allow-Methods"] = "POST,PUT, PATCH" - response["Access-Control-Allow-Headers"] = "Content-Type, if-match" + response["Access-Control-Allow-Methods"] = "GET,POST,PUT,PATCH" + response["Access-Control-Allow-Headers"] = "authorization, Content-Type, if-match" response["Access-Control-Expose-Headers"] = "Location" response["Access-Control-Allow-Credentials"] = 'true' response["Accept-Post"] = "application/ld+json" -- GitLab