From 5a4697a3b5c6234d5c6a18320dc0d71b703f7156 Mon Sep 17 00:00:00 2001 From: ocelog <128096274+ocelot81@users.noreply.github.com> Date: Sun, 19 May 2024 22:06:57 +0200 Subject: [PATCH] Update HTTP.lua --- MainModule/Server/Core/HTTP.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MainModule/Server/Core/HTTP.lua b/MainModule/Server/Core/HTTP.lua index cdbf9d473b..41a46e2349 100644 --- a/MainModule/Server/Core/HTTP.lua +++ b/MainModule/Server/Core/HTTP.lua @@ -39,7 +39,13 @@ return function(Vargs, GetEnv) server.HTTP = { Init = Init; - HttpEnabled = service.HttpService.HttpEnabled; + HttpEnabled = (function() + local success, res = pcall(service.HttpService.GetAsync, service.HttpService, "https://www.google.com/robots.txt") + if not success and res:find("Http requests are not enabled.") then + return false + end + return true + end)(); LoadstringEnabled = pcall(loadstring, ""); CheckHttp = function()