repos

blog.bythewood.me-rust

mirror archived upstream

Single-binary self-hosted Markdown blog on Rust axum: no database, live search, Typst PDF export, and strong SEO.

axumblogdockermarkdownminijinjarustself-hostedtypstvite

673 B · 40 lines · Caddyfile Raw History
 1# Caddyfile for blog
 2#
 3# I like to use Caddy Server for simple reverse proxies since it has built in
 4# automatic HTTPS support.
 5{
 6  servers {
 7    protocol {
 8      experimental_http3
 9    }
10  }
11}
12
13(common) {
14  header /static/* {
15    Cache-Control "public, max-age=315360000"
16  }
17
18  header /content/images/* {
19    Cache-Control "public, max-age=315360000"
20  }
21
22  header /* {
23    Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
24    X-XSS-Protection "1; mode=block"
25    X-Frame-Options DENY
26    X-Content-Type-Options nosniff
27    -Server
28    -X-Powered-By
29  }
30
31  encode zstd gzip
32}
33
34blog.example.com {
35  reverse_proxy localhost:8000
36
37  import common
38}