do not ignore csp even for disposition=inline

This commit is contained in:
Richard Schreiber
2026-03-16 15:03:06 +01:00
parent e68189a2ea
commit 35822e7f25
2 changed files with 0 additions and 2 deletions
-1
View File
@@ -746,7 +746,6 @@ class InvoicePreview(EventPermissionRequiredMixin, View):
if settings.DEBUG:
# attachment is more secure as we're dealing with user-generated stuff here, but inline is much more convenient during debugging
resp['Content-Disposition'] = 'inline; filename="{}"'.format(fname)
resp._csp_ignore = True
else:
resp['Content-Disposition'] = 'attachment; filename="{}"'.format(fname)
return resp
@@ -300,5 +300,4 @@ class SysReportView(AdministratorPermissionRequiredMixin, TemplateView):
resp = HttpResponse(data)
resp['Content-Type'] = mime
resp['Content-Disposition'] = 'inline; filename="{}"'.format(name)
resp._csp_ignore = True
return resp