Revision 3f1bee22 snf-cyclades-app/synnefo/api/delegate.py
b/snf-cyclades-app/synnefo/api/delegate.py | ||
---|---|---|
35 | 35 |
|
36 | 36 |
import urlparse |
37 | 37 |
from django.http import HttpResponse |
38 |
from django.views.decorators.csrf import csrf_exempt |
|
39 | 38 |
|
40 | 39 |
from django.conf import settings |
41 | 40 |
|
... | ... | |
71 | 70 |
return HttpResponse(data, status=status) |
72 | 71 |
|
73 | 72 |
|
74 |
@csrf_exempt |
|
75 | 73 |
def delegate_to_resources_service(request): |
76 | 74 |
logger.debug("Delegate resources request to %s" % RESOURCES_URL) |
77 | 75 |
token = request.META.get('HTTP_X_AUTH_TOKEN') |
... | ... | |
80 | 78 |
body=request.raw_post_data) |
81 | 79 |
|
82 | 80 |
|
83 |
@csrf_exempt |
|
84 | 81 |
def delegate_to_user_quota_service(request): |
85 | 82 |
logger.debug("Delegate quotas request to %s" % USER_QUOTA_URL) |
86 | 83 |
token = request.META.get('HTTP_X_AUTH_TOKEN') |
... | ... | |
89 | 86 |
body=request.raw_post_data) |
90 | 87 |
|
91 | 88 |
|
92 |
@csrf_exempt |
|
93 | 89 |
def delegate_to_feedback_service(request): |
94 | 90 |
logger.debug("Delegate feedback request to %s" % USER_FEEDBACK_URL) |
95 | 91 |
token = request.META.get('HTTP_X_AUTH_TOKEN') |
... | ... | |
98 | 94 |
body=request.raw_post_data) |
99 | 95 |
|
100 | 96 |
|
101 |
@csrf_exempt |
|
102 | 97 |
def delegate_to_user_catalogs_service(request): |
103 | 98 |
token = request.META.get('HTTP_X_AUTH_TOKEN') |
104 | 99 |
headers = {'X-Auth-Token': token, 'content-type': 'application/json'} |
Also available in: Unified diff