Increasing the limit for file_server
We're currently using Caddy to browse and search through its file server interface a series of debugging symbols. Each one of the directories is over 13000 hashes per symbols and we're hitting this limitation:
https://github.com/caddyserver/caddy/blob/2cac3c5491e6428441ecf668cc4f5a86e67ed9b3/modules/caddyhttp/fileserver/browse.go#L148
would it be possible to increase it, maybe in the file_server directive, as an attribute of browse? (max_limit?)
file_server {
browse max_limit BIG_NUMBER
}
I know that they're reachable and they can be downloaded, but it would be cool if we could set that limit on our own
Yep, definitely possible to make this configurable -- which I would prefer over increasing it. Just note that the larger this number is, the slower the performance is.
There are probably faster ways to list large directories (some sort of pagination), but that would be a slightly bigger task.
PRs welcome to make it configurable, should be trivial to implement. It would probably look more like this:
file_server {
browse {
file_limit <num>
}
}
The PR that fixes the issue is now submitted. We can either close the issue now or wait for the release of the version that has the fix.