freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject freemarker-online-tester git commit: Let's Encrypt verification URL and path must be /.well-known/acme-challenge/. Also, don't redirect that to HTTPS.
Date Tue, 15 May 2018 19:42:59 GMT
Repository: freemarker-online-tester
Updated Branches:
  refs/heads/master 62980b666 -> 269bf79d4


Let's Encrypt verification URL and path must be /.well-known/acme-challenge/. Also, don't
redirect that to HTTPS.


Project: http://git-wip-us.apache.org/repos/asf/freemarker-online-tester/repo
Commit: http://git-wip-us.apache.org/repos/asf/freemarker-online-tester/commit/269bf79d
Tree: http://git-wip-us.apache.org/repos/asf/freemarker-online-tester/tree/269bf79d
Diff: http://git-wip-us.apache.org/repos/asf/freemarker-online-tester/diff/269bf79d

Branch: refs/heads/master
Commit: 269bf79d4998c0372d0e074b1151015c35a6d362
Parents: 62980b6
Author: ddekany <ddekany@apache.org>
Authored: Tue May 15 21:42:51 2018 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Tue May 15 21:42:51 2018 +0200

----------------------------------------------------------------------
 .../dropwizard/FreeMarkerOnlineTester.java        |  4 ++--
 src/main/resources/freemarker-online.yml          | 18 +++++++++++++++---
 2 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/freemarker-online-tester/blob/269bf79d/src/main/java/org/apache/freemarker/onlinetester/dropwizard/FreeMarkerOnlineTester.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/onlinetester/dropwizard/FreeMarkerOnlineTester.java
b/src/main/java/org/apache/freemarker/onlinetester/dropwizard/FreeMarkerOnlineTester.java
index 563720a..6327348 100644
--- a/src/main/java/org/apache/freemarker/onlinetester/dropwizard/FreeMarkerOnlineTester.java
+++ b/src/main/java/org/apache/freemarker/onlinetester/dropwizard/FreeMarkerOnlineTester.java
@@ -68,14 +68,14 @@ public class FreeMarkerOnlineTester extends Application<FreeMarkerOnlineTesterCo
         bootstrap.addBundle(new ConfiguredAssetsBundle(
         		ImmutableMap.of(
         				"/assets/", "/assets/", // css, js, images...
-        				"/letsencrypt-verify", "/letsencrypt-verify" // Map to a file outside the jar
in the yml!
+        				"/override-me/", "/.well-known/acme-challenge/" // Map to a file outside the
jar in the yml!
         				)));
         bootstrap.addBundle(new RedirectBundle(
                 new UriRedirect(
                         "http://freemarker-online.kenshoo.com([:/].*)$",
                         "http://try.freemarker.org$1"),
                 new UriRedirect(
-                        "http://try.freemarker.apache.org([:/].*)$",
+                        "http://try.freemarker.apache.org((:\\d+)?/(?!\\.well-known/acme-challenge/).*)$",
                         "https://try.freemarker.apache.org$1")
         ));
     }

http://git-wip-us.apache.org/repos/asf/freemarker-online-tester/blob/269bf79d/src/main/resources/freemarker-online.yml
----------------------------------------------------------------------
diff --git a/src/main/resources/freemarker-online.yml b/src/main/resources/freemarker-online.yml
index 1ffb937..4dc96e7 100644
--- a/src/main/resources/freemarker-online.yml
+++ b/src/main/resources/freemarker-online.yml
@@ -34,6 +34,15 @@ logging:
 server:
   requestLog:
     appenders: []
+#      # FOR PRODUCTION:
+#      - type: file
+#        currentLogFilename: /opt/fmonlinetester/var/log/access.log
+#        threshold: ALL
+#        archive: true
+#        archivedLogFilenamePattern: /opt/fmonlinetester/var/log/access-%d.log.gz
+#        archivedFileCount: 5
+#        timeZone: UTC
+#        logFormat:
   applicationConnectors:    
       - type: http
         port: 8080
@@ -47,7 +56,8 @@ server:
   adminConnectors:
       # HTTP POST to /tasks/reload-ssl to reload SSL certificates without stopping.
       - type: http
-        port: 8081            
+        port: 8081
+                    
 viewRendererConfiguration:
   freemarker:  # was `.ftl:` before Dropwizard 1.3.0
     incompatibleImprovements: 2.3.28
@@ -55,8 +65,10 @@ viewRendererConfiguration:
     timeZone: UTC
     outputEncoding: UTF-8
     templateExceptionHandler: rethrow
+    
 assets:
   overrides:
     # Let's Encrypt certbot writes its domain ownership vertification file here. It will
visit
-    # it from outside when we ask for a new certificate: 
-    /letsencrypt-verify: /opt/fmonlinetester/var/letsencrypt-verify
\ No newline at end of file
+    # it from outside when we ask for a new certificate. Note that the left side location
must also
+    # be stated in FreeMarkerOnlineTester.java!  
+    /.well-known/acme-challenge/: /opt/fmonlinetester/var/letsencrypt-acme-challenge/.well-known/acme-challenge/
\ No newline at end of file


Mime
View raw message