This question already has an answer here:
- Enabling CORS in GeoServer (jetty)? 5 answers
I installed GeoServer 2.12.1 on windows 8.1 x64 and I am trying to design a custom "login" form using AngularJS5 with Node.js, but when I make a request to geoserver it rejected by CORS, and get the error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8080/geoserver/rest/. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
I read several questions here and follow the steps to enable CORS in geoserver by: downloading the matching "Jetty-Utility Servlets" jar file and putting it in the path:
C:\Program Files (x86)\GeoServer 2.12.1\webapps\geoserver\WEB-INF\lib
and also I uncomment the filters in the web.xml file and then restart geoserver .. but all that not worked with me.
I don't know what is wrong. As I said above I read several post about the problem but no luck.Like this question: Enabling CORS in GeoServer (jetty)?
I used in my request headers, the
Authorization header which doesn't allowed by default by
CORS, so I added it explicitly in the