salvo-rs/salvo

Provide ability to setup Content-Type for each file or type in StaticDir

Closed this issue · 1 comments

In many scenarios, we need to manually specify the Content Type and Content Disposal headers based on file type or file name.

See the handler-hoop branch. My thought is that it is difficult to have a very good way to have fine-grained control over individual files in a directory.
Allowing hoop to be added directly to the Handler gives control to the user.