diff --git a/osinaweb/osinacore/api/views.py b/osinaweb/osinacore/api/views.py index 5b3b68bf..726e5455 100644 --- a/osinaweb/osinacore/api/views.py +++ b/osinaweb/osinacore/api/views.py @@ -34,6 +34,12 @@ def authenticate_customer(request): user = authenticate(request, email=email, password=password) if user is not None: login(request, user) - return JsonResponse({'success': True}) + response = JsonResponse({'success': True}) else: - return JsonResponse({'success': False, 'error': 'Invalid credentials'}) \ No newline at end of file + response = JsonResponse({'success': False, 'error': 'Invalid credentials'}) + + response["Access-Control-Allow-Origin"] = "https://osimenu.com" + response["Access-Control-Allow-Methods"] = "POST" + response["Access-Control-Allow-Headers"] = "Content-Type" + + return response