diff options
author | 2018-12-12 09:19:53 +0300 | |
---|---|---|
committer | 2018-12-12 09:19:53 +0300 | |
commit | 1dc570a8aaaa8657eb4faa7283e30a5fde93d321 (patch) | |
tree | 115c5b3e11f893dcfeac6c9caa7023c7219ba4ef /src/main/java/com/juick/server/www/VaryHandler.java | |
parent | ae5870f1fa9bbf045f1881664bb8a3a098fd2610 (diff) |
Vary: Accept-Language
Diffstat (limited to 'src/main/java/com/juick/server/www/VaryHandler.java')
-rw-r--r-- | src/main/java/com/juick/server/www/VaryHandler.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/com/juick/server/www/VaryHandler.java b/src/main/java/com/juick/server/www/VaryHandler.java new file mode 100644 index 00000000..5a1b86a6 --- /dev/null +++ b/src/main/java/com/juick/server/www/VaryHandler.java @@ -0,0 +1,14 @@ +package com.juick.server.www; + +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ModelAttribute; + +import javax.servlet.http.HttpServletResponse; + +@ControllerAdvice +public class VaryHandler { + @ModelAttribute + public void setVaryResponseHeader(HttpServletResponse response) { + response.setHeader("Vary", "Accept-Language"); + } +} |