add Access-Control-Allow-Origin header to /media endpoint
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
j3d1 2023-11-01 01:43:42 +01:00
parent 64ee408082
commit 67aba0efa7

View file

@ -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: