osm-fr / osmose-frontend

Part of osmose that shows results on the website http://osmose.openstreetmap.fr
GNU General Public License v3.0
41 stars 38 forks source link

Export to JOSM does nothing (400) #343

Closed Tresho closed 3 years ago

Tresho commented 3 years ago

Hi,

400 (Bad Request) is displayed by the browser consoles when I try to export to JOSM.

The export link is:

http://osmose.openstreetmap.fr/it/josm_proxy?issues/open.josm?zoom=16&item=3092&level=1%2C2%2C3&limit=500&bbox=10.833549499511719%2C45.3649310694017%2C11.199531555175781%2C45.50177510698874

if I remove josm_proxy? the link works properly, loading objects to JOSM.

Best regards.

danfos commented 3 years ago

Yes, I also noticed it. Thanks for the work-around that works also for me.

Fixing it is just a matter of changing:

https://github.com/osm-fr/osmose-frontend/blob/7028cb343e532a51197c5a92fe56d08b8246c1cb/web/src/pages/map/top.vue#L52

But I wonder if that is the correct fix or that somehow "josm_proxy" should be fixed.

danfos commented 3 years ago

I see that when I open an issue and press the josm link "Edit Object with JOSM" the link works, for example:

http://osmose.openstreetmap.fr/en/josm_proxy?load_object?objects=w83225261

that is using "josm_proxy" without problems.

danfos commented 3 years ago

Looking at the links for RSS, GPX. KML and CVS I see the link is:

http://osmose.openstreetmap.fr/en/issues/open.rss?source=... http://osmose.openstreetmap.fr/en/issues/open.gpx?source=... http://osmose.openstreetmap.fr/en/issues/open.kml?source=... http://osmose.openstreetmap.fr/en/issues/open.csv?source=...

Following that, for JOSM, http://osmose.openstreetmap.fr/en/issues/open.josm?source=.... makes sense and that works fine so I think the correct fix is to remove "josm_proxy?" from the link.

frodrigo commented 3 years ago

Fixe with 5eebd90. The josm_poxy is required to avoid the browser to block the query to http josm only from https osmose.