diff options
-rw-r--r-- | juick-core/src/main/java/com/juick/TokensList.java | 5 | ||||
-rw-r--r-- | juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/juick-core/src/main/java/com/juick/TokensList.java b/juick-core/src/main/java/com/juick/TokensList.java index de5158c7..0da95951 100644 --- a/juick-core/src/main/java/com/juick/TokensList.java +++ b/juick-core/src/main/java/com/juick/TokensList.java @@ -2,6 +2,7 @@ package com.juick; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; import java.util.List; /** @@ -11,6 +12,10 @@ public class TokensList { private String type; private List<String> tokens; + public TokensList() { + tokens = new ArrayList<>(); + } + @JsonProperty("type") public String getType() { return type; diff --git a/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java b/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java index c4e6c07c..877c94ac 100644 --- a/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java +++ b/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java @@ -42,13 +42,13 @@ public class WwwServletConfiguration extends WebMvcConfigurationSupport { "/*.png", "/favicon.ico") .addResourceLocations("/") - .setCacheControl(CacheControl.maxAge(30, TimeUnit.DAYS)) + .setCacheControl(CacheControl.maxAge(30, TimeUnit.DAYS).mustRevalidate().cachePublic()) .resourceChain(true) .addResolver(new PathResourceResolver()); registry.addResourceHandler("/static/**") .addResourceLocations("/static/") - .setCacheControl(CacheControl.maxAge(30, TimeUnit.DAYS)); + .setCacheControl(CacheControl.maxAge(30, TimeUnit.DAYS).mustRevalidate().cachePublic()); } @Override |