geoserver rest接口跨域访问

我用的2.12.2版本,访问rest接口时遇到了跨域问题,参考http://blog.csdn.net/qq_29176825/article/details/77968307等文章时,发现源码文件中自带了跨域功能,只是默认没有启用。找到geoserver-2.12.2\src\web\app\src\main\webapp\WEB-INF\web.xml中