base: Play videos in new tab instead of downloading them.

We add `Content-Disposition: inline` header to commonly supported
video MIME types so that when we `Open` them in lightbox, they
play in new tab.

This will require a follow-up database migration to apply to
previously uploaded videos.
This commit is contained in:
Aman Agrawal 2023-10-03 04:08:09 +00:00 committed by Tim Abbott
parent 0b5e45d1a7
commit 9042cd989b
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,8 @@ INLINE_MIME_TYPES = [
"image/jpeg",
"image/png",
"image/webp",
"video/mp4",
"video/webm",
# To avoid cross-site scripting attacks, DO NOT add types such
# as application/xhtml+xml, application/x-shockwave-flash,
# image/svg+xml, text/html, or text/xml.