Need help with Http Headers

Hi, Developers

As we all know to access to www.roblox.com or any of its subdomains we need to use proxy today I started making a script that would get Json file content from https://setup.roblox.com/version-de2552d49fef49a5-API-Dump.json with this script

local url = "https://cors-anywhere.herokuapp.com/https://setup.roblox.com/version-de2552d49fef49a5-API-Dump.json";
local http = game:GetService("HttpService");

local success, res = pcall(http.RequestAsync, http, {
	Url = url;
	Method = "GET";
	Headers = {"origin,x-requested-with"};
});

if (success and res) then
	local res = http:JSONDecode(res);
	for i,v in next,res do
		print(i);
		print(v);
		wait();
	end;
end;

but i have slight problem i am getting error saying Unrecognized request option Header

i am new to https so how can i solve this issue.

1 Like

Headers are key-value pairs. What you’re passing right now is an array.

Your headers should look something like this:

Header = {
    ["x-requested-with"] = < Whatever the value of this thing is >,
    ...
}
1 Like

I am getting this

image

You should disable ssl verification for the herokuapp cors anywhere.

Refer to https://stackoverflow.com/questions/46975023/how-to-disable-ssl-verification-nodejs-loopback-request-plugin

PS: CORS is only at browser-mode javascript, so you don’t need to bypass it in nodejs. I would suggest direct link to Roblox.
Nvm. Realized you access from Roblox game directly. As far as I know disabling SSL verification wasn’t available on Roblox (yet?). I may be wrong though. Try using http:// or your own server.

2 Likes

Hmmm I changed https to http and gave me this that means it worked right?

image

Yeah! it worked.

1 Like

The issue is that setup.roblox.com is returning a SSL certificate which doesn’t list it in the alternate domains. You can verify this by visiting https://setup.roblox.com in your browser and your browser will warn you that there is a certificate mismatch. I don’t see a way to get herokuapp to ignore insecure requests but if you can then that would fix your problem while still allowing you to use HTTPS.

1 Like