fix: skip proxy for itemconfiguration.roblox.com (not supported by roproxy)

This commit is contained in:
2026-03-07 12:37:35 -05:00
parent 7df5b064d2
commit 2a2be5f7de
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "rbx-upload" name = "rbx-upload"
version = "0.2.0" version = "0.2.1"
description = "Roblox asset upload client" description = "Roblox asset upload client"
requires-python = ">=3.13" requires-python = ">=3.13"
dependencies = [ dependencies = [
+3 -3
View File
@@ -42,8 +42,8 @@ class RobloxClient:
} }
self._csrf_cookies = {".ROBLOSECURITY": roblosecurity} self._csrf_cookies = {".ROBLOSECURITY": roblosecurity}
def _proxy_url(self, url: str) -> str: def _proxy_url(self, url: str, force_direct: bool = False) -> str:
if not self._proxy: if not self._proxy or force_direct:
return url return url
return url.replace("roblox.com", self._proxy) return url.replace("roblox.com", self._proxy)
@@ -282,7 +282,7 @@ class RobloxClient:
"targetType": 0, "targetType": 0,
} }
response = await self._http.post( response = await self._http.post(
self._proxy_url("https://itemconfiguration.roblox.com/v1/collectibles"), self._proxy_url("https://itemconfiguration.roblox.com/v1/collectibles", force_direct=True),
json=data, json=data,
headers={ headers={
"X-CSRF-TOKEN": csrf, "X-CSRF-TOKEN": csrf,