-
-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
It would be fantastic to be able to call something like return CompressedStaticFileResult("some/file.html"); from a webapi controller method or return Results.CompressedStaticFile("some/file.html"); from a minimal API endpoint to leverage the conditional request and compressed file serving logic in custom endpoints. This would allow things like serving a 401/403 page with the appropriate status code.
I might be able to have a crack at this myself, I think it would look very similar to the CompressedStaticFileMiddleware class, except it would implement IActionResult and defer to PhysicalFileResult instead of StaticFileMiddleware. Would you consider accepting a PR?
Metadata
Metadata
Assignees
Labels
No labels