Unidata / tds

THREDDS Data Server
https://docs.unidata.ucar.edu/tds/5.0/userguide/index.html
BSD 3-Clause "New" or "Revised" License
64 stars 26 forks source link

catalog URL change 4.6 -> 5.x #504

Closed rjdave closed 3 days ago

rjdave commented 3 months ago

Since upgrading THREDDS from 4.6 to 5.5-SNAPSHOT, users noticed that all catalog URLs have changed. This is an issue because many have used the 4.6 style URL in publications and links from outside websites we don't have control over.

THREDDS 5.5 adds /catalog/ between thredds and the rest of the path to the catalog files. Interestingly, this is accounted for in the base catalog but all sub catalogs produce a not found error. Since our THREDDS is behind an nginx proxy, we have added some rewrite rules as a workaround. However, I am wondering if there is some kind of setting already or if one could be implemented to account for this fact in sub-catalogs as well.

Redirected automatically by THREDDS: https://host.com/thredds/catalog.html -> https://host.com/thredds/catalog/catalog.html

Results in 404 not found: https://host.com/thredds/subcat/catalog.html

haileyajohnson commented 3 months ago

Hi @rjdave - the change in URL was an intentional change to follow a more RESTful pattern, i.e. host/contextPath/service/resource?params

There is a redirect for the base catalog, because we know the name of it (catalog.xml); we could not set up redirects for any catalog in the same way. If you're interested in looking at the redirect implementation, you can find it here.

Configuring redirects in you nginx proxy is definitely the way to go, since you know the name of your catalogs and enabled services.