Thursday, 2 April 2015

Can't access GeoServer after CORS filter



To enable CORS filter I added the following in web.xml file in webapps/Geoserver/WEB-INF




cross-origin
org.eclipse.jetty.servlets.CrossOriginFilter

...



cross-origin
/*



After adding above, I restarted GeoServer. Now, when I access GeoServer, I get following error:


HTTP ERROR: 503

Problem accessing /geoserver/. Reason:

Service Unavailable

Answer



We had the same issue, after enabling CORS by removing the comments in web.xml original file supplied with GeoServer, GeoServer was no longer starting properly in any configuration (we tried using Mac OS X installer, with the platform independent binary and using Apache/Tomcat).


Finally, we managed to get the configuration to work using Apache/Tomcat but not using the default filter org.eclipse.jetty.servlets.CrossOriginFilter specified in web.xml supplied file but the Tomcat org.apache.catalina.filters.CorsFilter filter, as per https://enable-cors.org/server_tomcat.html (see also jgrocha answer at https://stackoverflow.com/questions/22363192/cors-tomcat-geoserver):




CorsFilter
org.apache.catalina.filters.CorsFilter


CorsFilter
/*

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...