mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 16:28:43 -03:30
Add a Location header to HTTP 201 for POST to copy endpoints
This commit is contained in:
@@ -980,4 +980,5 @@ class CopyAPIView(GenericAPIView):
|
|||||||
permission_check_func=permission_check_func
|
permission_check_func=permission_check_func
|
||||||
)
|
)
|
||||||
serializer = self._get_copy_return_serializer(new_obj)
|
serializer = self._get_copy_return_serializer(new_obj)
|
||||||
return Response(serializer.data, status=status.HTTP_201_CREATED)
|
headers = {'Location': new_obj.get_absolute_url(request=request)}
|
||||||
|
return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers)
|
||||||
|
|||||||
Reference in New Issue
Block a user