Commit 7156eb58 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

fix error messages and comments

(error messages for the sysadmin should be sent to the logs,
 not to the user)
parent b0032361
......@@ -96,6 +96,5 @@ def jobs(request):
class APIDownloadView(JobAuthMixin, View):
def get(self, request, *args, **kwargs):
log.debug("ADV !")
msg = "The file should be delivered by Nginx, so you should not be able to view this message !"
return JsonResponse({'error': msg}, status=404)
log.error("datastore requests must be served by nginx (bad config!)")
return JsonResponse({'error': 'Internal Server Error'}, status=500)
......@@ -19,8 +19,8 @@ server
# location are presented in their application/priority order
location /api/
{ # API should be accessible only with token
# it has to be CORS compliant.
{ # The CORS config allows any origin. These endpoints MUST NOT use
# authentication by cookie.
if ($request_method = 'OPTIONS')
add_header 'Access-Control-Allow-Origin' '*';
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment