Add example configuration for caching only by file ID

This commit is contained in:
x3 2024-02-28 12:16:29 +01:00
parent e583839bfe
commit 785a59992e
Signed by: x3
GPG Key ID: 7E9961E8AD0E240E
1 changed files with 10 additions and 0 deletions

View File

@ -36,6 +36,16 @@ server {
}
```
Caching based only on file id can be enabled with this example configuration
```cfg
location ~ /-([a-zA-Z0-9]+)/? {
# Other caching options are omitted here...
proxy_cache_revalidate on;
proxy_cache_key "$host$1";
# Other options omitted...
}
```
Then run with `./ngfshare -config /path/to/config.json`. To generate an auth key, run `./ngfshare -config /path/to/config.json -genauth`.
## Api