summaryrefslogtreecommitdiff
path: root/docs/cmdline-opts/proto-redir.d
blob: 73a27d0399b9d8837b5a9d071be006cde3908973 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Long: proto-redir
Arg: <protocols>
Help: Enable/disable PROTOCOLS on redirect
Added: 7.20.2
Category: connection curl
Example: --proto-redir =http,https $URL
---
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

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.