From 7db1b7fcbca85325f5b328cedbcd181c6a51f658 Mon Sep 17 00:00:00 2001 From: Wilfried OLLIVIER Date: Thu, 21 May 2020 12:04:20 +0200 Subject: [PATCH] Add www redirect to caddy reverse --- templates/reverse.caddy.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/reverse.caddy.j2 b/templates/reverse.caddy.j2 index 3df9157..6025808 100644 --- a/templates/reverse.caddy.j2 +++ b/templates/reverse.caddy.j2 @@ -27,3 +27,9 @@ } } + +{% if www_redirect %} +www.{{ vhost_url }} { + redir https://{{ vhost_url }} +} +{% endif %}