1
0
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:
Henry 2021-02-19 03:09:22 +00:00 committed by GitHub
commit dd3f4e7290
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);