WIP: proxy
[maven-thymeleaf-skin] / src / main / java / de / juplo / thymeproxy / Application.java
index a12205e..66557b9 100644 (file)
@@ -1,6 +1,7 @@
 package de.juplo.thymeproxy;
 
-import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -19,7 +20,13 @@ public class Application
   {
     RegexUrlHandlerMapping mapping = new RegexUrlHandlerMapping();
     mapping.setOrder(Ordered.HIGHEST_PRECEDENCE);
-    mapping.setUrlMap(Collections.singletonMap(".*\\.html$", handler));
+    Map<String, Object> mappings = new HashMap<>();
+    mappings.put(".*\\.html$", handler);
+    mappings.put("/css/.+", handler);
+    mappings.put("/js/.+", handler);
+    mappings.put("/fonts/.+", handler);
+    mappings.put("/.+/", handler);
+    mapping.setUrlMap(mappings);
        return mapping;
   }