cola

cola / Caddyfile

Last active 3 weeks ago

Like 0
Caddyfile Raw
1apollo.snek.network {
2 # Everything EXCEPT the Subsonic API requires Authentik SSO.
3 @protected not path /rest/*
4
5 route {
6 # Forward outpost traffic directly to Authentik
7 reverse_proxy /outpost.goauthentik.io/* https://id.snek.network {
8 header_up Host id.snek.network
9 header_up X-Real-IP {remote_host}
10 }
11
12 # Forward auth check — skipped for /rest/*
13 forward_auth @protected https://id.snek.network {
14 uri /outpost.goauthentik.io/auth/caddy
15 header_up X-Real-IP {remote_host}
16 header_up Host id.snek.network
17 copy_headers X-Authentik-Username X-Authentik-Groups X-Authentik-Email X-Authentik-Name X-Authentik-Uid
18 trusted_proxies private_ranges
19 }
20
21 # Your actual app
22 reverse_proxy :4533
23 }
24}
25
26www.iwannabethevery.best, iwannabethevery.best {
27 @discord header User-Agent "Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com)"
28 @notget not method GET
29 @notroot not path /
30
31 route {
32 abort @discord # Drop Discord to prevent it from crawling and generating an (incorrect) preview which follow the 302
33 abort @notget # Drop everything not GET (usual browser behaviour)
34 abort @notroot # Drop everything not on root
35 reverse_proxy :8090
36 }
37}
38
39chat.snek.network {
40 reverse_proxy :9000
41}
42
43www.cola.tf, cola.tf {
44 root * /home/cola/http
45
46 handle_errors 404 {
47 rewrite * /404.html
48 }
49 respond /.well-known/atproto-did "did:plc:o2suhoy3k7vt3qffhbkq3xbc" 200
50 file_server
51}
52
53www.snek.technology, snek.technology {
54 root * /home/cola/snek.technology
55
56 handle_errors 404 {
57 rewrite * /404.html
58 }
59 file_server
60}
61
62status.snek.network {
63 reverse_proxy :3001
64}