From 20b0882182c6212da7da6bb3386ca345e73bae34 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Sat, 11 Jun 2022 15:43:52 +0200 Subject: user agent --- src/main/java/cc/polyfrost/oneconfigloader/OneConfigLoader.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/main/java/cc/polyfrost/oneconfigloader/OneConfigLoader.java b/src/main/java/cc/polyfrost/oneconfigloader/OneConfigLoader.java index fa0121b..25f8071 100644 --- a/src/main/java/cc/polyfrost/oneconfigloader/OneConfigLoader.java +++ b/src/main/java/cc/polyfrost/oneconfigloader/OneConfigLoader.java @@ -128,6 +128,7 @@ public class OneConfigLoader implements IFMLLoadingPlugin { try { URL url = new URL(site); HttpsURLConnection con = (HttpsURLConnection) url.openConnection(); + con.setRequestProperty("User-Agent", "OneConfig-Loader"); con.setRequestMethod("GET"); int status = con.getResponseCode(); if (status != 200) { -- cgit