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): ...@@ -96,6 +96,5 @@ def jobs(request):
class APIDownloadView(JobAuthMixin, View): class APIDownloadView(JobAuthMixin, View):
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
log.debug("ADV !") log.error("datastore requests must be served by nginx (bad config!)")
msg = "The file should be delivered by Nginx, so you should not be able to view this message !" return JsonResponse({'error': 'Internal Server Error'}, status=500)
return JsonResponse({'error': msg}, status=404)
...@@ -19,8 +19,8 @@ server ...@@ -19,8 +19,8 @@ server
# location are presented in their application/priority order # location are presented in their application/priority order
location /api/ location /api/
{ # API should be accessible only with token { # The CORS config allows any origin. These endpoints MUST NOT use
# it has to be CORS compliant. # authentication by cookie.
if ($request_method = 'OPTIONS') if ($request_method = 'OPTIONS')
{ {
add_header 'Access-Control-Allow-Origin' '*'; 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