Skip to content

Commit 1a9dfab

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.5
2 parents 6fd8afb + d8e4de2 commit 1a9dfab

4 files changed

Lines changed: 14 additions & 11 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22

33
Copyright (c) 2014-2019 British Columbia Institute of Technology
4-
Copyright (c) 2019-2023 CodeIgniter Foundation
4+
Copyright (c) 2019-2024 CodeIgniter Foundation
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

user_guide_src/source/libraries/curlrequest.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,19 @@ or any of the shortcut methods.
157157
allow_redirects
158158
===============
159159

160-
By default, cURL will follow all "Location:" headers the remote servers send back. The ``allow_redirects`` option
161-
allows you to modify how that works.
160+
By default, cURL will not follow any "Location:" headers the remote servers send
161+
back. The ``allow_redirects`` option allows you to modify how that works.
162162

163-
If you set the value to ``false``, then it will not follow any redirects at all:
163+
If you set the value to ``true``, then it will follow redirects:
164164

165-
.. literalinclude:: curlrequest/013.php
165+
.. literalinclude:: curlrequest/014.php
166166

167-
Setting it to ``true`` will apply the default settings to the request:
167+
.. warning:: Please note that enabling redirects may redirect to a URL that you
168+
do not expect and may enable SSRF attacks.
168169

169-
.. literalinclude:: curlrequest/014.php
170+
Setting it to ``false`` will apply the default settings to the request:
171+
172+
.. literalinclude:: curlrequest/013.php
170173

171174
You can pass in array as the value of the ``allow_redirects`` option to specify new settings in place of the defaults:
172175

user_guide_src/source/libraries/curlrequest/014.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
$client->request('GET', 'http://example.com', ['allow_redirects' => true]);
44
/*
55
* Sets the following defaults:
6-
* 'max' => 5, // Maximum number of redirects to follow before stopping
7-
* 'strict' => true, // Ensure POST requests stay POST requests through redirects
8-
* 'protocols' => ['http', 'https'] // Restrict redirects to one or more protocols
6+
* 'max' => 5, // Maximum number of redirects to follow before stopping
7+
* 'strict' => true, // Ensure POST requests stay POST requests through redirects
8+
* 'protocols' => ['http', 'https'] // Restrict redirects to one or more protocols
99
*/

user_guide_src/source/license.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ The MIT License (MIT)
33
#####################
44

55
| Copyright (c) 2014-2019 British Columbia Institute of Technology
6-
| Copyright (c) 2019-2023 CodeIgniter Foundation
6+
| Copyright (c) 2019-2024 CodeIgniter Foundation
77
88
Permission is hereby granted, free of charge, to any person obtaining a copy
99
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)