From 72740475a762eac8123ed14662c3d1e1e8df4043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szekeres=20Ba=CC=81lint?= Date: Fri, 9 Mar 2018 23:38:32 +0100 Subject: [PATCH] toggle redirect --- public/assets/js/app.js | 5 +++++ public/index.html | 8 ++++++++ public/templates/conf/example.com.conf.html | 6 +++--- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/public/assets/js/app.js b/public/assets/js/app.js index e654c16..5eef3ab 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -35,6 +35,7 @@ https: false, http2: true, + redirect: true, force_https: true, cert_type: 'letsencrypt', @@ -292,6 +293,10 @@ return !$scope.isNonWWW(); }; + $scope.isRedirect = function() { + return $scope.data.redirect; + }; + $scope.isCDN = function() { return $scope.isWWW() && $scope.data.cdn; }; diff --git a/public/index.html b/public/index.html index 47df12b..a78b902 100644 --- a/public/index.html +++ b/public/index.html @@ -62,6 +62,14 @@ non-www +
+
+ + +
+
diff --git a/public/templates/conf/example.com.conf.html b/public/templates/conf/example.com.conf.html index b2d1e55..dd24d1e 100644 --- a/public/templates/conf/example.com.conf.html +++ b/public/templates/conf/example.com.conf.html @@ -123,12 +123,12 @@ server { location / { deny all; } -} - ---> # {{ isWWW() ? 'non-www, ' : '' }}subdomains redirect server { listen {{ data.ipv4 !== '*' ? data.ipv4 + ':' : '' }}{{ isHTTPS() ? '443 ssl' : '80' }}{{ isHTTP2() ? ' http2' : '' }};