Open ibigbug opened 1 month ago
current mime_guess is a hardcoded list.
taking a callback to optionally allow mapping certain file exts to something other than the hardcoded list would be helpful
some types are missed in the mime_guess, and sometimes people may want to intentionally override the mime for well known file types
take a callback and if it's set, preferred over here https://github.com/tower-rs/tower-http/blob/main/tower-http/src/services/fs/serve_dir/open_file.rs#L76
Feature Request
current mime_guess is a hardcoded list.
taking a callback to optionally allow mapping certain file exts to something other than the hardcoded list would be helpful
Motivation
some types are missed in the mime_guess, and sometimes people may want to intentionally override the mime for well known file types
Proposal
take a callback and if it's set, preferred over here https://github.com/tower-rs/tower-http/blob/main/tower-http/src/services/fs/serve_dir/open_file.rs#L76
Alternatives