| | |
| | | request.setCharacterEncoding("UTF-8");
|
| | | response.setCharacterEncoding("UTF-8");
|
| | | response.setContentType("text/html;charset=utf-8");
|
| | | isAlowCrossDomain(response);
|
| | | chain.doFilter(request, response); |
| | | |
| | | //检测跨域访问的请求
|
| | | if(URL != null && URL.endsWith("_ky")){
|
| | | /*if(URL != null && URL.endsWith("_ky")){
|
| | | String key = req.getParameter("key"); //获取校验码
|
| | | ServiceModel model = new ServiceModel();
|
| | | boolean isAlowVisit = false; //是否允许访问
|
| | |
| | | chain.doFilter(request, response);
|
| | | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
| | | //System.out.println("非跨域请求不允许放行"+request.getRemoteHost()+" At "+sdf.format(new Date()));
|
| | | }
|
| | | }*/
|
| | |
|
| | | }
|
| | |
|