seeking guidance on urls in catalogs

75 views
Skip to first unread message

David Hine

unread,
Aug 28, 2020, 3:06:58 AM8/28/20
to TerriaJS
Dear Group
I want to use data within TerriaMaps from a Geoserver on the same machine.

The machine has nginx serving as a reverse proxy for both TerriaMaps and the Geoserver. I can connect to both from the WAN successfully and call data or the getCapabilities xml.

None the less, those same links do not work in the catalog. TerriaMaps tries to call the capabilities xml but times out. 

The catalog item has this:
                   "url": "https://(domain).com/farming/wfs",
                    "type": "wfs-getCapabilities"
When that URL is called directly (and with the domain in it) plus the getCapabilities part, it delivers the capabilities. It fails when within the catalog and the dev tools network tab shows this link:
https://(domain).com/proxy/_1d/http://(domain).com/farming/wfs?service=WFS&version=1.1.0&request=GetCapabilities

Could someone please offer some guidance on what I am missing/not configuring properly.
thanks
David

Steve Bennett

unread,
Aug 29, 2020, 5:08:36 AM8/29/20
to terr...@googlegroups.com
At the risk of asking the obvious, are you actually running a TerriaJS Server on that server? That's what receives the /proxy/ URLs. It needs to be set up to whitelist the URLs you're wanting to proxy through it.

If you're not running such a server, and don't want to (because the GeoServer in question supports CORS), you should set the "corsDomains" property in your client-side config file so that TerriaJS knows it doesn't need to use a proxy for those domains. See https://docs.terria.io/guide/customizing/initialization-files/ .

Steve

--
You received this message because you are subscribed to the Google Groups "TerriaJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terriajs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terriajs/88c34a0a-c0e4-430d-997a-38a0a8094fa5n%40googlegroups.com.

David Hine

unread,
Aug 30, 2020, 12:44:44 AM8/30/20
to terr...@googlegroups.com

Hi Steve

No question is too obvious, as you may have found. Thanks for taking the time to raise it.

As I understand it, the build of Terriamap provides one. I assumed it was running automatically from the npm start command. I want to have a deeper understanding of its functionality as it seems to provide tools that we want to incorporate in our application.

In looking at the server Readme.md (as I recall) it is possible to run some tests (also serving as examples) from the cmd line. These failed when I ran npm run test. But it is not obvious whether the command is incomplete or the server is not actually running (my first thought).

Could you kindly clarify/guide me on how to confirm if the supplementary server is running and how to run the tests

thanks

David

You received this message because you are subscribed to a topic in the Google Groups "TerriaJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/terriajs/_HmXLxGWPw4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to terriajs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terriajs/CADJEhEXMWWcqLPYF9cFPEeSKvzt501k2kGb3XxsnHfyKvZ-Ouw%40mail.gmail.com.
--
Land and Water Management logo

David Hine
Land and Water Management PL
Level 27, 480 Queen St
Brisbane, Qld 4000
Australia

m: 0429 886 146 +61 429 886 146
t: (07) 4015 3470 +61 7 4015 3470

GeoPortal with example presentations of spatial data for horticulture users and others.
Land and Water Management PL


Stephen Davies

unread,
Sep 23, 2020, 1:48:40 AM9/23/20
to TerriaJS
Hi David,

To see if terriajs-server is running check whether https://(domain).com/proxy/ in a browser shows "No url specified."
You can also check that https://(domain).com/serverconfig/ returns a JSON object.

As Steve said above I think setting `corsDomains` will be the best fix

Stephen
Reply all
Reply to author
Forward
0 new messages