-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcaddy-proxy.caddyfile
More file actions
56 lines (51 loc) · 983 Bytes
/
caddy-proxy.caddyfile
File metadata and controls
56 lines (51 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
order cache after rewrite
order cache after header
metrics
cache
servers :8080 {
name metrics
}
servers :80 {
name proxy
}
}
:8080 {
metrics /metrics
}
:80 {
# Do not allow HTTP clients to bypass the cache.
request_header -Cache-Control
handle /ws {
respond 403
}
handle {
cache {
allowed_http_verbs GET
redis {
configuration {
# https://github.com/gofiber/storage/blob/main/rueidis/README.md#config
ClientName souin-redis
InitAddress musicpresence-client-proxy_redis:6379
DisableCache true
CacheTTL 60s
}
}
key {
disable_body
disable_host
disable_method
# the query is never forwarded to the client.
# it should not be possible to circumvent the cache
# by using meaningless query parameters.
disable_query
disable_scheme
headers Content-Type
hide
}
default_cache_control no-store
}
reverse_proxy loon:80
# respond {http.request.header.cache-control}
}
}