From 00b4dbcc335bb243eeab63e12ad1486f0f6c4f81 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=84=AD=E8=84=88=E9=BE=8D?= <hausenism@hotmail.com>
Date: Mon, 25 Jun 2018 14:14:00 +0800
Subject: [PATCH] fix utf-8 issue: add ajax setup for utf-8

---
 .../src/main/webapp/WEB-INF/tags/header.tag                | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/header.tag b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/header.tag
index f4b4430cf..b880fd2f7 100644
--- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/header.tag
+++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/header.tag
@@ -37,6 +37,13 @@
     <script type="text/javascript" charset="UTF-8" src="resources/js/lib/moment-with-locales.js"></script>
     <script type="text/javascript" src="resources/js/lib/i18next.js"></script>
     <script type="text/javascript">
+	    $.ajaxSetup({
+	        headers: {
+	            "Accept": "application/json; charset=UTF-8",
+	            "Content-Type": "application/json; charset=UTF-8"
+	        }
+	    });
+	    
         $.i18n.init({
             fallbackLng: "en",
             lng: "${config.locale}",