shredder on Nostr: Caddy rocks! Max Hillebrand Simple method to Set up nip 05 - ``` example.com { root * ...
Caddy rocks! Max Hillebrand (nprofile…mlw6)
Simple method to Set up nip 05 -
```
example.com {
root * /var/www/example.com
file_server
# Redirect HTTP to HTTPS
@http {
protocol http
}
redir @http https://{host}{uri}
# Handle Nostr Verification
handle /.well-known/nostr.json {
header Content-Type application/json
respond `{
"names": {
"example_name": "npub1examplepublickeyhexvalue1234567890abcdef"
}
}` 200
}
# Automatic TLS with email
tls example_email@example.com
}
```
Simple method to Set up nip 05 -
```
example.com {
root * /var/www/example.com
file_server
# Redirect HTTP to HTTPS
@http {
protocol http
}
redir @http https://{host}{uri}
# Handle Nostr Verification
handle /.well-known/nostr.json {
header Content-Type application/json
respond `{
"names": {
"example_name": "npub1examplepublickeyhexvalue1234567890abcdef"
}
}` 200
}
# Automatic TLS with email
tls example_email@example.com
}
```