From #97
Nginx serves static files
Now that can be (IMO) a more interesting feature request for Granian.
I think it would be very useful to have some sort of static file serving functionality.
Either something like nginx's try_files
where granian could first check a folder for a match, and if not, fall back to the RSGI/ASGI/WSGI app, or maybe just support mapping URL paths to folders.
A plus would be if granian could optionally serve those files with far-future expiry headers. nginx does the following when using expires max
:
The max parameter sets “Expires” to the value “Thu, 31 Dec 2037 23:55:55 GMT”, and “Cache-Control” to 10 years.
From https://nginx.org/en/docs/http/ngx_http_headers_module.html
This is the only feature which is missing for me to make granian a one-stop solution to serve everything with a single ingress, no sidecars or similar.
(I'd be willing to work on this with some guidance, or fund it if that's helpful.)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too