Hi dear,
I have an issue about cros.
I tried to get this link using ajax (http://192.168.229.94:8080/thredds/wms/testAll/GFS202009060000?service=WMS&version=1.3.0&REQUEST=GetMetadata&item=minmax&LAYERS=HGT&SRS=EPSG%3A4326&BBOX=50.4,38,56.8,44.4&WIDTH=256&HEIGHT=256&callback=jQuery3410787186710990256_1599400222381&_=1599400222382)
But I've got the following error:
Cross-Origin Read Blocking (CORB) blocked cross-origin response http://192.168.229.94:8080/thredds/wms/testAll/GFS202009060000?service=WMS&version=1.3.0&REQUEST=GetMetadata&item=minmax&LAYERS=HGT&SRS=EPSG%3A4326&BBOX=50.4,38,56.8,44.4&WIDTH=256&HEIGHT=256&callback=jQuery3410787186710990256_1599400222381&_=1599400222382 with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.
I added the following line in the usr/local/tds/tomcat/conf/web.xml
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>cors.allowed.methods</param-name>
<param-value>GET,POST,HEAD</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Also I did uncomment the the following line in the /usr/local/tds/tomcat/content/thredds/threddsconfig.xml
<CORS>
<enabled>false</enabled>
<maxAge>1728000</maxAge>
<allowedMethods>GET</allowedMethods>
<allowedHeaders>Authorization</allowedHeaders>
<allowedOrigin>*</allowedOrigin>
</CORS>
But I receive this error again.
How can I solve my issue.
Thanks