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;
{
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;
}
}
String resource = builder.toString();
- LOG.debug("requesting: {}", resource);
CloseableHttpResponse p_response = null;
try
StatusLine status = p_response.getStatusLine();
int code = status.getStatusCode();
- LOG.debug("response: {} - {}", code, status.getReasonPhrase());
+ LOG.info("{} - {}: {}", code, status.getReasonPhrase(), resource);
setCacheControl(computeCacheControl(p_response));
prepareResponse(response);
thymeproxy.ttl=@thymeproxy.ttl@
thymeproxy.origins[0].uri=http://localhost:8080/thymeleaf/
-logging.level.de.juplo=trace
+logging.level.de.juplo=info
logging.level.org.apache.http=@httpclient.logging.level@
logging.level.org.apache.http.wire=ERROR