Issue with WMS Legends Geoserver and Proxy in MapStore

50 views
Skip to first unread message
Assigned to lorenzo...@geosolutionsgroup.com by me

Raul Gallego

unread,
Jan 30, 2025, 11:19:50 AMJan 30
to mapstore-users
Hi everyone,

I'm having an issue displaying WMS layer legends from GeoServer in MapStore. I've configured my GeoServer URL in the localConfig.json file, and the proxy works correctly for GetMap and GetFeatureInfo requests. However, GetLegendGraphic requests are sent directly to the GeoServer URL instead of going through the proxy.

Is there a way to force GetLegendGraphic requests to go through the MapStore proxy as well?

Thanks in advance for your help.   

Raul Gallego

unread,
Jan 30, 2025, 11:19:55 AMJan 30
to mapstore-users

Tobia Di Pisa

unread,
Jan 30, 2025, 11:22:04 AMJan 30
to mapstor...@googlegroups.com
Hi,

In theory it should be automatic. Is it possible to try somewhere?

Regards,
      Tobia Di Pisa

--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mapstore-users/bbba7a33-b9c0-43c7-83c2-8e47060e4a13n%40googlegroups.com.


--


==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==
Dott. Ing. Tobia Di Pisa
Technical Lead / Project Manager


GeoSolutions Group
phone: +39 0584 962313

mobile: +39 340 1781783
fax:      +39 0584 1660272

https://www.geosolutionsgroup.com/
http://twitter.com/geosolutions_it
-------------------------------------------------------


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

harry cr7

unread,
Jan 31, 2025, 1:32:25 AMJan 31
to mapstor...@googlegroups.com
Dear Raul,
After setting up the geoserver url in the  localConfig.json file, did you restart apache ?
Have you tried to consume your layer in Qgis to see if the legend appeared?
Best Regard

--

Raul Gallego

unread,
Jan 31, 2025, 4:36:00 AMJan 31
to mapstore-users

Hi, I'm sharing the URL of a test viewer with open access (no login required) https://webmap112.112rmurcia.es/#/viewer/129. My Tomcat-GeoServer is running on HTTP, but this is not an issue since it's within a secure intranet.

I've confirmed that GetMap and GetFeatureInfo work correctly, but GetLegendGraphic returns an error stating that "the legend is not available."

If you could help me with this, I would really appreciate it, as I'm stuck on this part of the project.

Thanks in advance.

Raul Gallego

unread,
Jan 31, 2025, 4:36:06 AMJan 31
to mapstore-users

Hi, I'm sharing the URL of a test viewer with open access (no login required) url test . My Tomcat-GeoServer is running on HTTP, but this is not an issue since it's within a secure intranet.

I've confirmed that GetMap and GetFeatureInfo work correctly, but GetLegendGraphic returns an error stating that "the legend is not available."

If you could help me with this, I would really appreciate it, as I'm stuck on this part of the project.

Thanks in advance.


El jueves, 30 de enero de 2025 a las 17:22:04 UTC+1, Tobia Di Pisa escribió:

Raul Gallego

unread,
Feb 3, 2025, 9:10:41 AMFeb 3
to mapstore-users
We are performing a **tcpdump** on our **GeoServer** and **MapStore** servers.

What we have observed is that the **GetMap** and **GetFeatureInfo** requests correctly pass through the MapStore proxy. However, the **GetLegendGraphic** requests are being sent directly from the client to the GeoServer IP, which should not be the case. This is problematic because the GeoServer server should not be exposed directly to the internet.

As part of the configuration, clients or users should only access GeoServer through the MapStore proxy and not directly. This misaligned traffic flow could pose risks and needs to be corrected to ensure all traffic is routed properly through the proxy.

We look forward to your guidance or solution to adjust this configuration.

Sebastián Meyer

unread,
May 29, 2025, 3:40:21 AMMay 29
to mapstore-users
Hi Raul,

It's possible I'm in a similar situation, have you found a solution?

TIA,

--
Sebastián

Lorenzo Natali

unread,
Jun 10, 2025, 3:46:49 AMJun 10
to mapstore-users
Hi,
Using MapStore proxy to expose GeoServer functionality is ideal, because OGC service describe their services on their own, declaring the address where to reach some specific sub-services (e.g. getLegendGraphic). 
It is better to expose GeoServer via an http proxy (e.g. httpd or nginx), and define the proxy base URL of GeoServer to properly make the application generate the correct URL, that can be so used by the application connected to it.
Then connect MapStore to the application
for instance you may make your GeoServer accessible to "https://www.myApplication.com/geoserver/", and, depending on the configuration of the proxy, you can configure proxy base URL with the same address, to make GeoServer always expose the same address. 
 

Reply all
Reply to author
Forward
0 new messages