Skip to content

Instantly share code, notes, and snippets.

@xgugeng
Created April 17, 2022 23:45
Show Gist options
  • Save xgugeng/7563950eaf2766721d855a3c9d59ada5 to your computer and use it in GitHub Desktop.
Save xgugeng/7563950eaf2766721d855a3c9d59ada5 to your computer and use it in GitHub Desktop.
Caddyfile for Wakapi
wakapi.example.com {
log {
output file /var/log/caddy/wakapi.log
}
# Optional for Cloudflare
tls {
dns cloudflare {env.CF_API_TOKEN}
}
encode gzip
header * Strict-Transport-Security "max-age=2592000; includeSubDomains"
reverse_proxy localhost:3000
# Optional: HTTP/2 server push for static assets
@api path_regexp "^/api.*"
@notapi not path_regexp "^/api.*"
push @notapi /assets/app.css
push @notapi /assets/vendor/roboto.css
push @notapi /assets/vendor/tailwind.dist.css
push @notapi /assets/vendor/seedrandom.min.js
push @notapi /assets/vendor/Chart.bundle.min.js
push @notapi /assets/vendor/roboto-latin.woff2
push @notapi /assets/images/logo.svg
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment