gitea/modules
silverwind eeb490c7ab
Rework raw file http header logic (#20484) (#20542)
- Always respect the user's configured mime type map
- Allow more types like image/pdf/video/audio to serve with correct content-type
- Shorten cache duration of raw files to 5 minutes, matching GitHub
- Don't set `content-disposition: attachment`, let the browser decide whether it wants to download or display a file directly
- Implement rfc5987 for filenames, remove previous hack. Confirmed it working in Safari.
- Make PDF attachment work in Safari by removing `sandbox` attribute.

This change will make a lot more file types open directly in browser now. Logic should generally be more readable than before with less `if` nesting and such.

Replaces: https://github.com/go-gitea/gitea/pull/20460
Replaces: https://github.com/go-gitea/gitea/pull/20455
Fixes: https://github.com/go-gitea/gitea/issues/20404
2022-07-30 18:37:02 +02:00
..
activitypub
analyze
appstate
auth
avatar
base
cache
charset
container
context Fix package permission checks for organizations (#20517) (#20520) 2022-07-28 22:05:59 +08:00
convert
csv
doctor
emoji
eventsource
generate
git
gitgraph
graceful
hcaptcha
highlight
hostmatcher
httpcache Add Cache-Control header to html and api responses, add no-transform (#20432) (#20459) 2022-07-23 11:58:58 +01:00
httplib
indexer
json
lfs
log
markup
metrics
migration
nosql
notification
options
packages Add Docker /v2/_catalog endpoint (#20469) (#20556) 2022-07-30 17:52:04 +02:00
paginator
password
pprof
private
process
proxy
public
queue
recaptcha
references
regexplru
repository
secret
session
setting Allow RSA 2047 bit keys (#20272) (#20396) 2022-07-18 10:30:01 -04:00
ssh Stop logging EOFs and exit(1)s in ssh handler (#20476) (#20529) 2022-07-29 02:10:42 +02:00
storage
structs Dismiss prior pull reviews if done via web in review dismiss (#20197) (#20407) 2022-07-19 17:46:33 +02:00
svg
sync
templates
test
timeutil
translation
typesniffer Rework raw file http header logic (#20484) (#20542) 2022-07-30 18:37:02 +02:00
updatechecker
upload
uri
user
util
validation
web