mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
Add a Location header to HTTP 201 for POST to copy endpoints
This commit is contained in:
parent
da0fe173c9
commit
2916edd70f
@ -980,4 +980,5 @@ class CopyAPIView(GenericAPIView):
|
||||
permission_check_func=permission_check_func
|
||||
)
|
||||
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user