From 5e89e07d83a8cdcfdc157e1a7013418f90ca78cd Mon Sep 17 00:00:00 2001 From: padams Date: Mon, 24 Jan 2022 19:49:40 +0000 Subject: [PATCH] allowing explicit redirect levels --- owa_httpRequest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/owa_httpRequest.php b/owa_httpRequest.php index a9bab531..e221a471 100644 --- a/owa_httpRequest.php +++ b/owa_httpRequest.php @@ -266,7 +266,13 @@ function getRequest($url, $arguments = '') { $request = new Request('GET', trim( $url ) ); $this->response = $this->http->send( $request, [ - 'allow_redirects' => true, + 'allow_redirects' => [ + 'max' => 5, + 'strict' => false, + 'referer' => false, + 'protocols' => ['http', 'https'], + 'track_redirects' => false + ], 'headers' => [ 'User-Agent' => owa_coreAPI::getSetting('base', 'owa_user_agent')