Skip to content

Commit e9af56e

Browse files
Update README.md
1 parent a816d9a commit e9af56e

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
# Chaperone
22

3-
[Chaperone](https://en.wikipedia.org/wiki/Chaperone_(social)) is a forward HTTP proxy that does caching & rate-limiting. It's meant to sit between your workloads and external servers, keeping the amount of simultaneous connections in check and caching responses where possible. This prevents you from overloading servers, getting rate-limited or even IP-banned. It also allows you to keep your code relatively simple: Sending off requests without having to coordinate or consider various HTTP caching or rate-limiting semantics.
4-
5-
> [!IMPORTANT]
6-
> Chaperone does not support the CONNECT verb and can thus not act as a https proxy.
7-
> This is because https proxies act as TCP relays and cannot see the HTTP request or response,
8-
> leaving them unable to cache or rate-limit based on url.
9-
>
10-
> All outgoing requests must be made to http addresses. Set the X-Upgrade-HTTPS header to 'true'
11-
> to make Chaperone upgrade your address to https before sending off the request.
3+
[Chaperone](https://en.wikipedia.org/wiki/Chaperone_(social)) is a forward (outgoing) HTTP proxy that does caching & rate-limiting. It's meant to sit between your workloads and external servers, keeping the amount of simultaneous connections in check and caching responses where possible. This prevents you from overloading servers, getting rate-limited or even IP-banned. It also allows you to keep your code relatively simple: Sending off requests without having to coordinate or consider various HTTP caching or rate-limiting semantics.
124

135
## Configuration
146
Chaperone takes a configuration file, located at $CONFIGFILE (default: ./chaperone.yaml), where you can specify rate limits & caching overrides. It takes the following format:
@@ -28,7 +20,7 @@ rate_limits:
2820

2921
cache_overrides:
3022
# Force a cache of at least 10m to 1h on all urls starting with `https://example.com`
31-
# Responses without cache headers are given a caching ttl of 1m.
23+
# Responses without cache headers are given a caching ttl of 10m.
3224
- url: https://example.com
3325
min_ttl: 10m
3426
max_ttl: 1h
@@ -42,6 +34,15 @@ cache_overrides:
4234
```
4335
4436
## Implementation
37+
38+
> [!IMPORTANT]
39+
> Chaperone does not support the CONNECT verb and can thus not act as a https proxy.
40+
> This is because https proxies act as TCP relays and cannot see the HTTP request or response,
41+
> leaving them unable to cache or rate-limit based on url.
42+
>
43+
> All outgoing requests must be made to http addresses. Set the X-Upgrade-HTTPS header to 'true'
44+
> to make Chaperone upgrade your address to https before sending off the request.
45+
4546
### Python requests
4647
```python
4748
import requests

0 commit comments

Comments
 (0)