From 33179e5af15d2155931a8bbc375593322e145f0c Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 28 Mar 2024 15:02:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=91=EB=8B=B5=20=ED=97=A4=EB=8D=94=20?= =?UTF-8?q?=EC=88=98=EC=A0=95(charset=3Dutf-8=20=EC=B6=94=EA=B0=80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cokr/xit/base/ResponseHeaderFilter.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/cokr/xit/base/ResponseHeaderFilter.java b/src/main/java/cokr/xit/base/ResponseHeaderFilter.java index b2af1548..e8909af6 100644 --- a/src/main/java/cokr/xit/base/ResponseHeaderFilter.java +++ b/src/main/java/cokr/xit/base/ResponseHeaderFilter.java @@ -28,6 +28,14 @@ public class ResponseHeaderFilter implements Filter { chain.doFilter(request, new HttpServletResponseWrapper((HttpServletResponse) response) { + @Override + public void setContentType(String type) { + if(type.equals("text/css") || type.equals("application/javascript") || type.equals("image/svg+xml")) { + type = type+";charset=UTF-8"; + } + super.setContentType(type); + } + @Override public void setHeader(String name, String value) {