mirror of
https://github.com/zDevelopers/ImageOnMap.git
synced 2024-11-16 07:05:14 +01:00
Add user agent to URLConnection
This could help the server not denying (403) the request.
This commit is contained in:
parent
dbe9975e49
commit
87edc2da48
@ -69,6 +69,7 @@ public class ImageRendererExecutor extends Worker
|
||||
public ImageMap run() throws Throwable
|
||||
{
|
||||
final URLConnection connection = url.openConnection();
|
||||
connection.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0");
|
||||
connection.connect();
|
||||
|
||||
if (connection instanceof HttpURLConnection)
|
||||
@ -179,4 +180,4 @@ public class ImageRendererExecutor extends Worker
|
||||
|
||||
return MapManager.createMap(poster, playerUUID, mapsIDs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user