2016-11-16 21:20:36 +08:00
|
|
|
Long: proto-redir
|
|
|
|
Arg: <protocols>
|
|
|
|
Help: Enable/disable PROTOCOLS on redirect
|
|
|
|
Added: 7.20.2
|
2020-07-13 20:15:04 +08:00
|
|
|
Category: connection curl
|
2021-08-31 22:37:14 +08:00
|
|
|
Example: --proto-redir =http,https $URL
|
2016-11-16 21:20:36 +08:00
|
|
|
---
|
|
|
|
Tells curl to limit what protocols it may use on redirect. Protocols denied by
|
|
|
|
--proto are not overridden by this option. See --proto for how protocols are
|
|
|
|
represented.
|
|
|
|
|
|
|
|
Example, allow only HTTP and HTTPS on redirect:
|
|
|
|
|
|
|
|
curl --proto-redir -all,http,https http://example.com
|
|
|
|
|
2021-09-28 16:30:59 +08:00
|
|
|
By default curl will only allow HTTP, HTTPS, FTP and FTPS on redirect (since
|
|
|
|
7.65.2). Specifying *all* or *+all* enables all protocols on redirects, which
|
|
|
|
is not good for security.
|