Browse Source

Set user agent on API requests

Clément Wolf 4 tháng trước cách đây
mục cha
commit
c6f03c64a0
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/App/Osu/BanchoNetworking.cpp

+ 1 - 0
src/App/Osu/BanchoNetworking.cpp

@@ -205,6 +205,7 @@ static void send_api_request(CURL *curl, APIRequest api_out) {
     }
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write);
     curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&response);
+    curl_easy_setopt(curl, CURLOPT_USERAGENT, "osu!");
 #ifdef _WIN32
     // ABSOLUTELY RETARDED, FUCK WINDOWS
     curl_easy_setopt(curl, CURLOPT_CAINFO, "curl-ca-bundle.crt");