diff --git a/api/views.py b/api/views.py index 8c46851..7b659c8 100644 --- a/api/views.py +++ b/api/views.py @@ -57,7 +57,7 @@ class PredictionCreateView(APIView): print("Tawhiri error:", str(e), e.response.text if e.response else "no response") return Response({"error": f"Tawhiri error: {str(e)}"}, status=status.HTTP_502_BAD_GATEWAY) - prediction = Prediction.objects.create(result=prediction_result, user=request.user, request=validated_data) + prediction = Prediction.objects.create(result=prediction_result, user=request.user, request=request.data) return Response({ "id": prediction.id, "created_at": prediction.created_at, diff --git a/testapi/settings.py b/testapi/settings.py index d8715c1..8d50619 100644 --- a/testapi/settings.py +++ b/testapi/settings.py @@ -172,8 +172,8 @@ REST_FRAMEWORK = { } -CSRF_COOKIE_SAMESITE = 'Lax' -SESSION_COOKIE_SAMESITE = 'Lax' -CSRF_COOKIE_HTTPONLY = True -SESSION_COOKIE_HTTPONLY = True -CSRF_TRUSTED_ORIGINS = ['http://localhost:5173'] \ No newline at end of file +CSRF_COOKIE_SAMESITE = 'None' # temp +CSRF_COOKIE_SECURE = False +SESSION_COOKIE_SAMESITE = 'None' # temp +SESSION_COOKIE_SECURE = False +CSRF_TRUSTED_ORIGINS = ['http://localhost:5173', 'http://127.0.0.1:5173'] \ No newline at end of file