|
|
|
@ -78,7 +78,7 @@ def serve_media(request, path): |
|
|
|
content_type, _ = mimetypes.guess_type(filename) |
|
|
|
response = HttpResponse(content_type=content_type or 'application/octet-stream') |
|
|
|
response['X-Accel-Redirect'] = f'/internal/media/{path}' |
|
|
|
response['Content-Disposition'] = f"attachment; filename*=UTF-8''{quote(filename)}" |
|
|
|
response['Content-Disposition'] = f"inline; filename*=UTF-8''{quote(filename)}" |
|
|
|
response['Cache-Control'] = 'public, max-age=86400, stale-while-revalidate=3600' |
|
|
|
response['X-Robots-Tag'] = 'noindex' |
|
|
|
return response |
|
|
|
|