ImageOnMap

ImageOnMap

148k Downloads

403 Forbidden on self-hosted webserver source

LcorpOfficial opened this issue · 6 comments

commented

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.

commented

We already use a user agent, maybe there is an issue with the user agent

connection.addRequestProperty("User-Agent",
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0");

commented

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

commented

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

commented

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.

commented

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

commented

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