Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mimes option for serve-static #2067

Closed
ryuapp opened this issue Jan 23, 2024 · 1 comment
Closed

mimes option for serve-static #2067

ryuapp opened this issue Jan 23, 2024 · 1 comment
Labels
enhancement New feature or request.

Comments

@ryuapp
Copy link
Contributor

ryuapp commented Jan 23, 2024

What is the feature you are proposing?

This feature supports rarely used content-types and great amount of types.
Also, I think to remove unnecessary default MIME to make it lighter in the future.

// HLS
const mimes = {
  m3u8: 'application/x-mpegURL',
  ts: 'video/mp2t'
}
app.use('/video/*', serveStatic({mimes}))
@ryuapp ryuapp added the enhancement New feature or request. label Jan 23, 2024
@ryuapp ryuapp changed the title mimes option for serve-staic mimes option for serve-static Jan 23, 2024
@yusukebe
Copy link
Member

Hi @ryuapp

I think this will be a good feature. If you can create the PR, please make it based on the "v4" branch. We are now making all new features in v4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants