diff --git a/pandora/oxdjango/api/views.py b/pandora/oxdjango/api/views.py index 31c71232..6d431e8a 100644 --- a/pandora/oxdjango/api/views.py +++ b/pandora/oxdjango/api/views.py @@ -17,6 +17,8 @@ def api(request): response = render_to_json_response({'status': {'code': 200, 'text': 'use POST'}}) response['Access-Control-Allow-Origin'] = '*' + response['Access-Control-Allow-Methods'] = 'POST, GET, OPTIONS' + response['Access-Control-Allow-Headers'] = 'Content-Type' return response if request.META['REQUEST_METHOD'] != "POST" or ( not 'action' in request.POST and request.META.get('CONTENT_TYPE') != 'application/json'