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

Configuration for static file middleware #2040

Open
rengert opened this issue Jan 7, 2024 · 1 comment
Open

Configuration for static file middleware #2040

rengert opened this issue Jan 7, 2024 · 1 comment

Comments

@rengert
Copy link
Contributor

rengert commented Jan 7, 2024

Piranha is adding the static file middle using IStartupFilter during the service setup.
As the static file middle is a terminalmiddleware it is not possible to configure it twice.
So it would be great to be able to configure the cache control and expires using piranha.

Edit: same for compression

As a quick fix i wrote my own start filter or is there already an existing solution?

@tidyui
Copy link
Member

tidyui commented Apr 13, 2024

Hi there! Sorry for the late response. Are your referring to the static file provider configured when running local assets with Piranha.Local.FileStorage. If this is the case, would it be enough the have the possibility to add an Action to set the options when calling UseFileStorage(...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants