summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAdam Szatyin <szatyinadam@gmail.com>2021-05-10 22:38:08 +0200
committerGitHub <noreply@github.com>2021-05-10 16:38:08 -0400
commitd86d12332269c0d8b13ab2ea70c688640e44946e (patch)
treece6ba2d457a53894ee1e73896417f8bbe59232ca /docs
parent2f65c6b2f03d4b8908422e63788d8775b5d64a8f (diff)
downloadgitea-d86d12332269c0d8b13ab2ea70c688640e44946e.tar.gz
gitea-d86d12332269c0d8b13ab2ea70c688640e44946e.zip
Add mimetype mapping settings (#15133)
* Fix APK's Content-Type header * Fix case sensitive comparison * Add custom mime type mapping for downloadable files * Add documentation for MIME type mapping * Rename download.mimetype.mapping configuration to repository.mimetype_mapping Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'docs')
-rw-r--r--docs/content/doc/advanced/config-cheat-sheet.en-us.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/content/doc/advanced/config-cheat-sheet.en-us.md b/docs/content/doc/advanced/config-cheat-sheet.en-us.md
index a37d06fab6..9bb790f4c9 100644
--- a/docs/content/doc/advanced/config-cheat-sheet.en-us.md
+++ b/docs/content/doc/advanced/config-cheat-sheet.en-us.md
@@ -143,6 +143,15 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
- `LOCAL_COPY_PATH`: **tmp/local-repo**: Path for temporary local repository copies. Defaults to `tmp/local-repo`
+## Repository - MIME type mapping (`repository.mimetype_mapping`)
+
+Configuration for set the expected MIME type based on file extensions of downloadable files. Configuration presents in key-value pairs and file extensions starts with leading `.`.
+
+The following configuration set `Content-Type: application/vnd.android.package-archive` header when downloading files with `.apk` file extension.
+```ini
+.apk=application/vnd.android.package-archive
+```
+
## CORS (`cors`)
- `ENABLED`: **false**: enable cors headers (disabled by default)