Skip to content

Commit

Permalink
Add caching proxy example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
BastienClement committed Jul 14, 2024
1 parent 1a33713 commit 02e3768
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Provide auto-index in front of Google Cloud Storage buckets.

Intended to be used together with a caching proxy.
Plays well with a caching proxy in front. 😉

## Usage

Expand All @@ -24,3 +24,27 @@ For each bucket:
- `-skip-readme`: skip README.md in directory listings
- `-version-sort`: sort directory listings using a semver-aware algorithm
- `-v`: enable verbose logging

## Example nginx caching proxy configuration

```
http {
proxy_cache_path /var/cache/nginx keys_zone=static:10m max_size=1g inactive=1w;
upstream gcs-index {
server unix:/path/to/gcs-index.sock;
}
server {
proxy_cache static;
proxy_cache_use_stale error timeout invalid_header updating;
proxy_cache_revalidate on;
proxy_cache_valid 200 404 1m;
proxy_cache_background_update on;
location / {
proxy_pass http://gcs-index;
}
}
}
```

0 comments on commit 02e3768

Please sign in to comment.