-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue Enabling CORS #24
Comments
Took me a while to figure out what exactly needed to be added based on your edited comment. Here it is in case anyone else looking at this is as clueless as me 😀
|
Oops sorry about it being unclear, the formatting must have messed up when I pasted my code. Thanks for making it more clear! |
Hello, for me what worked was a few extra init-params, in
|
This solved my problem! However, I still get these console errors:
Can this be a feature implementation? |
I need CORS enabled so I can get WMS layers from geoserver with Cesium. When running my own version of geoserver(not dockerized) I just edit /tomcat/webapps/geoserver/WEB-INF/web.xml and uncomment the CORS filters. I copied the web.xml file, edited it, and then ran docker with the new web.xml mounted by doing: docker run --name "geoserver" --link postgis:postgis -v ~/web.xml:/usr/local/tomcat/webapps/geoserver/WEB-INF/web.xml -p 8080:8080 -d -t kartoza/geoserver
After making this change when I got to localhost:8080/geoserver/index.html I get a 404 error. Any idea why this is happening or know of a way to enable CORS?
EDIT: Please close this issue, I realized I was editing the wrong the web.xml file. For anyone having this issue, you have to edit the /tomcat/conf/web.xml (not /tomcat/webapps/geoserver/WEB-INF/web.xml) file and in the filter section add this:
CorsFilter org.apache.catalina.filters.CorsFilter CorsFilter /*The text was updated successfully, but these errors were encountered: