Creating a proxy server for roblox

I am using glitch.com to host the proxy and looking at an old post here, I tried to attempt the same thing. Though I was able to run a get request for the proxy link, I am unable to actually post to the proxy server as it keeps saying trust check failed and using javascript for this.

This is the current code I have on glitch:

app.get('/proxy', async function (req, res) {
  console.log("Trying i guess")
  const httpInstance = await axios.create({
    headers: {"AuthCode": "SomeRandomCode"}
  })
  const url = "www.thisisanawesomeurlthatidontknow.com"
  httpInstance.post(url).then(function (response) {
    console.log(response)
  })
  
  res.json(url)
})

On the roblox end I have,

local Data = {
	["AuthCode"] = "SomeRandomCode"
}
--Proxy is the link
httpservice:PostAsync(Proxy, httpservice:JSONEncode(Data))

Anyone know how to fix this? I assume its something I did wrong on the roblox end

2 Likes

Roblox will fail HTTP requests that:

  • Have “incomplete” URLs that do not start with http or https, (http://a.com will work, while a.com won’t)
  • are to Roblox’s domain, most likely for security reasons.

Read more: HttpService | Documentation - Roblox Creator Hub

6 Likes