aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/www/VaryHandler.java
blob: 5a1b86a692bdca7b4a6f28dc6fbd775f52c5fa71 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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");
    }
}