could you help me with geoserver shapefile?

1. A concise explanation of the problem you are experiencing.

Hi I have a question, when I load a shapefile from my geoserver that is in localhost send me the error:

Access to XMLHttpRequest at 'http: // localhost: 8085 / geoserver / sic / wms? Transparent = true & format = image% 2Fpng & service = WMS & version = 1.1.0 & request = GetMap & layers = sic% 3Ahidro & bbox = -115.04149627685547% 2C15.439924240112305% 2C-90.65814208984375% 2C32.72083282470703 & width = 768 & height = 544 & srs = EPSG% 3A4326 & styles = ‘from origin’ http: // localhost: 10081 ‘has been blocked by CORS policy: No’ Access-Control-Allow-Origin 'header is present on the requested resource.

2. An example of a minimum code. If you have found an error, this helps us to reproduce and repair it.

The part of the code is the following:

function setupLayers () {

addAdditionalLayerOption (

’test’,

new Cesium.WebMapServiceImageryProvider ({

url: ‘http: // localhost: 8085 / geoserver / sic / wms? service = WMS & version = 1.1.0 & request = GetMap & layers = sic% 3Ahidro & bbox = -115.04149627685547% 2C15.439924240112305% 2C-90.65814208984375% 2C32.72083282470703 & width = 768 & height = 544 & srs = EPSG% 3A4326 & format = application / openlayers’,

layers: ‘hydro’,

parameters: {

transparent: ‘true’,

format: 'image / png’

}

}));

}

3. Context. Why do you need to do this? We could know a better way to achieve your goal.

It’s a personal project where I want to see some layers of Mexico

4. The version of Cesium you are using, your operating system and browser.

I am using Cesium 1.56.1

Windows 10 and Chrome

Are you running your CesiumJS code on the hosted Sandcastle (https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/) or on a local server as well? I think it should work if both are hosted on localhost or generally from the same origin.

hello such, try what you recommended me, but the error remains the same, I send you a capture

![image.png|1920x1080](upload://ew2oHnHwoPXWTQaAJqmfONlMWAf.png)

Can you check for errors in the browser console? What about the network tab?

Are these URLs accessible in the browser outside of Cesium? Like if you go to http://localhost:8085/geoserver/sic/wms/tilemapresource.xml does it load a valid file?