How do I disallow redirects in HTTP requests?

I think that having forced redirects allowed is a security risk where the third party can redirect to something malicious, making the experience vulnerable.
For example:

local HttpService = game:GetService("HttpService")
print(HttpService:RequestAsync({
	Url="https://httpbin.org/redirect/2",
	Method="GET"
}))

The result won’t say if the request was redirected, is there a way to send a HTTP request without allowing redirects? Like the result would be just status code like 302 and show the location header in the response headers.

1 Like