ImageOnMap icon indicating copy to clipboard operation
ImageOnMap copied to clipboard

403 Forbidden on self-hosted webserver source

Open LcorpOfficial opened this issue 4 years ago • 6 comments

when making a map using a hosted image on a webserver I own; I receive a 403 error. can open and view content via browser fine. A possible fix here but not sure.

LcorpOfficial avatar Feb 14 '21 11:02 LcorpOfficial

We already use a user agent, maybe there is an issue with the user agent https://github.com/zDevelopers/ImageOnMap/blob/cc58b1d3200f63ceb514ecc10302315950f9a9a6/src/main/java/fr/moribus/imageonmap/image/ImageRendererExecutor.java#L64-L65

Vlammar avatar Feb 14 '21 12:02 Vlammar

This user agent is quite old, maybe we should update it

AmauryCarrade avatar Feb 14 '21 12:02 AmauryCarrade

Perhaps; discord chat image URLs are a good example for testing this as they seem to be a replicatable method for the same error, if that’s helpful

LcorpOfficial avatar Feb 14 '21 16:02 LcorpOfficial

For discord it's linked to the fact that you need to authentifie yourself to access attachment files. Without this you don't have the permission storage.objects.get https://i.imgur.com/Z9f3PMf.png.

Vlammar avatar Feb 14 '21 21:02 Vlammar

ah! that makes sense. simple workaround would be to self host the images; once that's working.

example from server is https://media.lcorpcity.com/lccanim.gif

LcorpOfficial avatar Feb 15 '21 08:02 LcorpOfficial

I've found some infos on how to access discord attachment files, I will try to see if that works.

Vlammar avatar Feb 22 '21 17:02 Vlammar