Last active
January 14, 2019 21:52
-
-
Save dbaston/1806a5b97e51f7a90fdb3f7c35ddd08b to your computer and use it in GitHub Desktop.
Enable CORS in GeoServer with xmlstarlet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xmlstarlet ed --inplace -P \ | |
-s "//web-app" -t elem -n TEMPNODE -v "" \ | |
-s "//TEMPNODE" -t elem -n "filter-name" -v "cross-origin" \ | |
-s "//TEMPNODE" -t elem -n "filter-class" -v "org.eclipse.jetty.servlets.CrossOriginFilter" \ | |
-r "//TEMPNODE" -v "filter" \ | |
-s "//web-app" -t elem -n TEMPNODE -v "" \ | |
-s "//TEMPNODE" -t elem -n "filter-mapping" \ | |
-s "//TEMPNODE" -t elem -n "filter-name" -v "cross-origin" \ | |
-s "//TEMPNODE" -t elem -n "url-pattern" -v "/*" \ | |
-r "//TEMPNODE" -v "filter-mapping" \ | |
$GEOSERVER_HOME/webapps/geoserver/WEB-INF/web.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment