-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaddyfile
More file actions
34 lines (31 loc) · 774 Bytes
/
Copy pathCaddyfile
File metadata and controls
34 lines (31 loc) · 774 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
{
{$CADDY_DEBUG}
auto_https off
servers {
protocols h1 h2
}
}
:80 {
respond "Hello, caddy!"
}
google.{$CADDY_DOMAIN:localhost}:80 {
reverse_proxy https://www.google.com {
header_up Host {http.reverse_proxy.upstream.hostport}
}
}
translate.{$CADDY_DOMAIN:localhost}:80 {
reverse_proxy https://translate.google.com {
header_up Host {http.reverse_proxy.upstream.hostport}
}
}
platform.openai.{$CADDY_DOMAIN:localhost}:80 {
reverse_proxy https://platform.openai.com {
header_up Host {http.reverse_proxy.upstream.hostport}
}
}
api.openai.{$CADDY_DOMAIN:localhost}:80 {
reverse_proxy https://api.openai.com {
header_up Authorization "Bearer {$OPENAI_API_KEY}"
header_up Host {http.reverse_proxy.upstream.hostport}
}
}