You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,6 @@
1
1
# Chaperone
2
2
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.
12
4
13
5
## Configuration
14
6
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:
28
20
29
21
cache_overrides:
30
22
# 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.
32
24
- url: https://example.com
33
25
min_ttl: 10m
34
26
max_ttl: 1h
@@ -42,6 +34,15 @@ cache_overrides:
42
34
```
43
35
44
36
## 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.
0 commit comments