# Proxy/CORS problem of WMS/WMTS

**URL:** <https://community.cesium.com/t/proxy-cors-problem-of-wms-wmts/3289>\
**Category:** CesiumJS\
**Created:** [November 9, 2015, 8:51am UTC](https://community.cesium.com/t/proxy-cors-problem-of-wms-wmts/3289 "2015-11-09T08:51:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ming-Che\_Liu](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@Ming-Che\_Liu](https://community.cesium.com/u/Ming-Che_Liu)\
**Post date:** [November 9, 2015, 8:51am UTC](https://community.cesium.com/t/proxy-cors-problem-of-wms-wmts/3289/1 "2015-11-09T08:51:29Z")

</div>

Hi all,

I've tried to run the same WMTS code in three different sandcastle environment: Cesium official web site, local-host IIS and local-host node.js. Only the environment of local-host node.js could be displayed the correct result (nodejs.png) and the others respond to the error messages about proxy and CORS. I've added the CORS code in web.config file but it is still not workable. I've no idea about that. Does anyone have any suggestions to solve this issue?

The WMTS Code:  
var viewer = new Cesium.Viewer('cesiumContainer');

// Add a WMS imagery layer  
var imageryLayers = viewer.imageryLayers;  
imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider({  
&nbsp;&nbsp;&nbsp;&nbsp;url : ‘[http://maps.nlsc.gov.tw/S\_Maps/wmts](http://maps.nlsc.gov.tw/S_Maps/wmts)’,  
&nbsp;&nbsp;&nbsp;&nbsp;layer : ‘EMAP’,  
&nbsp;&nbsp;&nbsp;&nbsp;style : ‘default’,  
&nbsp;&nbsp;&nbsp;&nbsp;format : ‘image/png’,  
&nbsp;&nbsp;&nbsp;&nbsp;tileMatrixSetID : ‘GoogleMapsCompatible’,  
&nbsp;&nbsp;&nbsp;&nbsp;proxy : new Cesium.DefaultProxy(’/proxy/’)  
}));
