NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [thredds] CORS on thredds, or more specifically - thredds WMS on worldwindserver.net

  • To: "thredds@xxxxxxxxxxxxxxxx" <thredds@xxxxxxxxxxxxxxxx>
  • Subject: Re: [thredds] CORS on thredds, or more specifically - thredds WMS on worldwindserver.net
  • From: Adam Steer <Adam.Steer@xxxxxxxxxx>
  • Date: Fri, 12 Feb 2016 00:05:39 +0000
  • Authentication-results: unidata.ucar.edu; dkim=none (message not signed) header.d=none;unidata.ucar.edu; dmarc=none action=none header.from=anu.edu.au;
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:23
Hi all

I solved my own problem. CORS works for thredds catalogues if I enable a CORS 
filter in tomcat, and comment out the CORS section in threddsConfig.xml.

thredds = 4.5.5 - 20150306.1537
tomcat = 7.0.65.0
OS = CentOS 6.7

Cheers
Adam


> On 11 Feb 2016, at 11:10 AM, Adam Steer <Adam.Steer@xxxxxxxxxx> wrote:
> 
> Hi all
> 
> I’m new at thredds - and diving straight into attempting to get data from a 
> thredds server to appear on worldwindserver.net. I’m failing at googling up a 
> result, so I hope this hasn’t been covered somewhere here recently.
> 
> if I try to add a server at worldwindserver.net with the form:
> 
> http://ip.address/thredds/wms/gb6/ocean_eta_1993_03.nc?service=WMS&version=1.3.0&request=GetCapabilities
> 
> ….worldwindserver.net tells me 'Failed to retrieve WMS capabilities from 
> [URL]:….’.
> 
> I’ve been pursuing the line that it may be a CORS issue, so I’ve followed 
> Apache’s instructions and added the following to webxml:
> ---
> <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</param-value>
>    </init-param>
>    <init-param>
>      <param-name>cors.exposed.headers</param-name>
>      
> <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>
>    </init-param>
> 
>  </filter>
>  <filter-mapping>
>    <filter-name>CorsFilter</filter-name>
>    <url-pattern>/*</url-pattern>
>  </filter-mapping>
> 
> ---
> …and enabled the CORS element in threddsConfig.xml:
> ---
>  <CORS>
>    <enabled>true</enabled>
>    <maxAge>1728000</maxAge>
>    <allowedMethods>GET</allowedMethods>
>    <allowedHeaders>*</allowedHeaders>
>    <allowedOrigin>*</allowedOrigin>
>  </CORS>
> ---
> (set allowedHeaders to *, not sure if this is advisable or correct!)
> 
> However, the result from worldwindserver.net is unchanged.
> 
> Also - using this service: http://client.cors-api.appspot.com/client
> 
> …tells me that CORS is not enabled on my thredds catalogue.
> 
> Tomcat is hard restarted after both changes, I’m wondering if there is 
> anywhere else I should look, or make changes.
> 
> …or, does anyone have a thredds catalogue which is successfully serving WMS 
> data to worldwindserver, and is happy to share bits of config files?
> 
> Thanks
> 
> Adam
> 
> 
> ===============================
> Adam Steer
> Earth Systems Data Service Specialist
> National Computational Infrastructure
> Leonard Huxley Building, Mills Road
> The Australian National University
> Canberra, ACT, 0200 Australia
> +61 2 6125 1413
> adam.steer@xxxxxxxxxx
> ===============================
> 
> 
> _______________________________________________
> thredds mailing list
> thredds@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit: 
> http://www.unidata.ucar.edu/mailing_lists/

  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: