fix: skip proxy for itemconfiguration.roblox.com (not supported by roproxy)
This commit is contained in:
+1
-1
@@ -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 = [
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user