no message

main
이범준 8 months ago
parent 560af98fa7
commit e498a19437

@ -7,6 +7,7 @@ import javax.servlet.FilterChain;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse; import javax.servlet.ServletResponse;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper; import javax.servlet.http.HttpServletResponseWrapper;
@ -28,6 +29,19 @@ public class ResponseHeaderFilter implements Filter {
chain.doFilter(request, new HttpServletResponseWrapper((HttpServletResponse) response) { chain.doFilter(request, new HttpServletResponseWrapper((HttpServletResponse) response) {
@Override
public void addCookie(Cookie cookie) {
if(cookie.getValue().equals("") && cookie.getMaxAge() == 0) {
cookie.setValue("null");
}
cookie.setHttpOnly(true);
super.addCookie(cookie);
}
@Override @Override
public void setContentType(String type) { public void setContentType(String type) {
if(type.equals("text/css") if(type.equals("text/css")

Loading…
Cancel
Save