mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
adding Cache-Control header with value no-cache to static web resources
Cache-Control: no-cache, forces the browser to check if the resource has not changed, before the resources is taken from cache.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package sonia.scm;
|
||||
|
||||
import com.github.sdorra.webresources.CacheControl;
|
||||
import com.github.sdorra.webresources.WebResourceSender;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import org.slf4j.Logger;
|
||||
@@ -44,7 +45,8 @@ public class WebResourceServlet extends HttpServlet {
|
||||
private final WebResourceSender sender = WebResourceSender.create()
|
||||
.withGZIP()
|
||||
.withGZIPMinLength(512)
|
||||
.withBufferSize(16384);
|
||||
.withBufferSize(16384)
|
||||
.withCacheControl(CacheControl.create().noCache());
|
||||
|
||||
private final UberWebResourceLoader webResourceLoader;
|
||||
private final PushStateDispatcher pushStateDispatcher;
|
||||
|
||||
Reference in New Issue
Block a user