]> source.dussan.org Git - gitea.git/commit
Add Cache-Control header to html and api responses, add no-transform (#20432)
authorsilverwind <me@silverwind.io>
Sat, 23 Jul 2022 06:38:03 +0000 (08:38 +0200)
committerGitHub <noreply@github.com>
Sat, 23 Jul 2022 06:38:03 +0000 (14:38 +0800)
commit14178c56bb0fbc8b0b5820539e7681a7defeff47
tree4da90c0d0761a1cf7a066738fc434b78ba02b33f
parentd9608c4e76401ffdd5958e1944ba0a17ded825b9
Add Cache-Control header to html and api responses, add no-transform (#20432)

`no-transform` allegedly disables CloudFlare auto-minify and we did not
set caching headers on html or api requests, which seems good to have
regardless.

Transformation is still allowed for asset requests.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Andrew Thornton <art27@cantab.net>
modules/context/api.go
modules/context/context.go
modules/httpcache/httpcache.go
routers/install/routes.go
routers/web/base.go