emilhe / dash-leaflet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Unexpected parameters passed when making the request for a `WMSTileLayer`

guidocioni opened this issue · comments

Looking at the request made in the browser for a component using a WMSTileLayer there are some parameters that I don't think are supposed to be there (I took this from the dash-leaflet example page, https://www.dash-leaflet.com/components/raster_layers/wms_tile_layer)

Screenshot 2024-02-05 at 16 08 29

These are parameters used by Dash internally to set the component properties which should not be exposed in the request made to get a WMS Tile. I think they were mistakenly included in the code that creates the request body and remained unnoticed because some geo servers still respond without issues even if some unexpected parameters are passed in the request.

However, in my case, the geoserver was not accepting this and caused a Access Denied to appear, breaking the functionality of the app. This is why I noticed this :)

Related to #35, where it seems that the fix was introduced in 0.0.23rc2 but I'm using dash-leaflet == 1.0.15.
Maybe a regression?

hey @emilhe could you give me some feedback on this? I have found no workaround for manually removing these unwanted props from the request that is made and I'm kind of stuck with a non functional feature because of this regression. thanks 🙏

Hi @guidocioni . Sorry for the late reply - I have been swamped in work lately. I have just pushed a build, which should remove the arguments. Can you check if it works as intended?

pip install dash-leaflet==1.0.16rc2

If it does, I'll wrap on a non-rc release :)

pip install dash-leaflet==1.0.16rc2

Hey @emilhe. I'm extremely sorry but I somewhat missed your reply!
I just tested 1.0.16rc2 and it is indeed working again!

Could you let me know once this fix reaches the conda package? Thanks and keep up the good work!