dotnet / WatsonWebserver

Watson is the fastest, easiest way to build scalable RESTful web servers and services in C#.
MIT License
403 stars 83 forks source link

How to set the filter mime type #105

Closed sqlnew closed 1 year ago

sqlnew commented 1 year ago

Hi, When I set the local static folder, specify Routes.Content.Add, and how to set the filter to prevent the specific mime type files from being accessed or downloaded; How to add a mime type file to make it a downloadable and accessible file type?

jchristn commented 1 year ago

Hi @sqlnew there isn't a way to further filter invocation of a route based on a MIME type. I like the idea of adding more annotations that filter when a route is used. But for now, it would have to be handled in your route body.

sqlnew commented 1 year ago

Thank you!