Skip to content

Instantly share code, notes, and snippets.

@oscarfonts
Forked from essoen/web.xml
Created August 7, 2018 08:29
Show Gist options
  • Save oscarfonts/ccf4f29c79a904b306ece9fae3d07b97 to your computer and use it in GitHub Desktop.
Save oscarfonts/ccf4f29c79a904b306ece9fae3d07b97 to your computer and use it in GitHub Desktop.
CORS * for GeoServer with Tomcat add following to `/var/lib/tomcat7/webapps/geoserver/WEB-INF/web.xml`
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>cors.allowed.origins</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.methods</param-name>
<param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment