add Access-Control-Allow-Origin header to /media endpoint
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
64ee408082
commit
67aba0efa7
1 changed files with 2 additions and 1 deletions
|
@ -16,7 +16,8 @@ def media_urls(request, id, format=None):
|
|||
return Response(status=status.HTTP_200_OK,
|
||||
content_type=file.mime_type,
|
||||
headers={
|
||||
'X-Accel-Redirect': f'/redirect_media/{id}'
|
||||
'X-Accel-Redirect': f'/redirect_media/{id}',
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
}) # TODO Expires and Cache-Control
|
||||
|
||||
except File.DoesNotExist:
|
||||
|
|
Loading…
Reference in a new issue