What I want to achieve is the following.
When I recibe a request for a HTML, JS or CSS file, return its minified version. I minify when I publish, not dinamically.
Example:
- Browser asks por /index.html
- Server checks the extensions
- Server checks if a index.min.html exists on disk
- If exists, server returns index.min.html file, else index.html
All in a single request
I tried read about rewriting and file providers, but I didn't found a standard nor easy way to do this.
What should be the way to do this?
Thanks in advance!