sonr/config/caddy/Caddyfile
Prad Nukala a4dbb41202
feature/dwn database state (#18)
* refactor: move database, navigator scripts to state package

* feat: add Schema config for dwn

* test: add unit tests for InitializeDatabase

* feat: use templated index.html for the DWN frontend

* feat: introduce templ generation for templ

* chore(deps): update devbox.json to use latest packages

* chore: update devbox to use bun

* feat: introduce dwn config generation

* feat: add motr.mjs for vault management

* refactor: move front end from  to  (alert)

* feat: implement devbox integration and devbox-based process management

* feat: embed motr.mjs script for offline demo

* refactor: embed motr.mjs data in embed.go

* chore: update workflows to use actions/checkout@v4

* refactor: move process-compose.yaml to deploy directory

* refactor: remove unnecessary JSON conversion
2024-09-21 21:42:51 -04:00

34 lines
614 B
Caddyfile

{
email team@sonr.id
}
# Vaults at vault.sonr.id
vault.sonr.id {
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
resolvers 1.1.1.1
}
# Match paths that are bech32 addresses
@vault path_regexp vaultPath ^/([a-z0-9]{42})(/.*|)$
handle @vault {
# Rewrite to IPFS gateway format
uri replace /{re.vaultPath.0} /ipns/{re.vaultPath.1}{re.vaultPath.2}
# Proxy to IPFS gateway
reverse_proxy http://localhost:8080
}
file_server
header {
Content-Type .wasm application/wasm
Service-Worker-Allowed "/"
# Add any other necessary headers
}
# Optional: Enable compression
encode zstd gzip
}