diff options
-rw-r--r-- | container.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/container.scm b/container.scm index ef97dc1..2cab0f4 100644 --- a/container.scm +++ b/container.scm @@ -114,6 +114,14 @@ ,(httpd-directive 'ServerAdmin "koszko@koszko.org") ,(httpd-tag 'If (list (format #f "%{HTTP_HOST} != '~a'" name)) (httpd-directive 'Redirect 'permanent "/" + (format #f "http~a://~a/" + (if tls? "s" "") name))) + ,(httpd-tag 'ElseIf + (list (format #f "~a && (~a !~~ ~a)" + (if tls? "false" "true") + "%{REQUEST_URI}" + "m#^/[.]well-known/acme-challenge/.*#")) + (httpd-directive 'Redirect 'permanent "/" (format #f "https://~a/" name))) ,(httpd-directive 'Alias "/.well-known/acme-challenge" "/srv/http/acme-challenge/") |