Created
April 17, 2022 23:45
-
-
Save xgugeng/7563950eaf2766721d855a3c9d59ada5 to your computer and use it in GitHub Desktop.
Caddyfile for Wakapi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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