10 lines
292 B
Caddyfile
10 lines
292 B
Caddyfile
# HTTPS in front of the Node.js app. Caddy gets and renews the certificate for $DOMAIN on its own.
|
|
{$DOMAIN} {
|
|
encode zstd gzip
|
|
reverse_proxy app:3000
|
|
}
|
|
|
|
# www.example goes to the domain without www. Needs a DNS record for www too.
|
|
www.{$DOMAIN} {
|
|
redir https://{$DOMAIN}{uri} permanent
|
|
}
|