mirror of
https://github.com/SKCraft/Launcher.git
synced 2024-11-24 12:16:28 +01:00
Add User-Agent to news page HTTP requests (#401)
This commit is contained in:
commit
dd3f4e7290
@ -250,6 +250,7 @@ public final class WebpagePanel extends JPanel {
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setUseCaches(false);
|
||||
conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Java) SKMCLauncher");
|
||||
conn.setDoInput(true);
|
||||
conn.setDoOutput(false);
|
||||
conn.setReadTimeout(5000);
|
||||
|
Loading…
Reference in New Issue
Block a user