]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
www_static: support default_type parameter
authorEric Wong <e@80x24.org>
Tue, 10 Jun 2025 05:18:09 +0000 (05:18 +0000)
committerEric Wong <e@80x24.org>
Fri, 13 Jun 2025 12:30:30 +0000 (12:30 +0000)
commit1a7f93f3224f9463849d31e1e5a753579021010f
tree54c1be021bf2627183b913e5158650a7347db884
parent02c51cf4eec2383ef4d329d3025e09060d28ee1c
www_static: support default_type parameter

Sysadmins may wish to override the default
`application/octet-stream' for files with no suffix or unknown
suffixes.  One use case is serving the
https://public-inbox.org/README itself with the `text/plain'
Content-Type.

Plack::MIME->set_fallback can be an alternative to this
parameter, but its effect is interpreter-wide and server admins
may wish to set the default type on a per-route basis.
lib/PublicInbox/WwwStatic.pm