xref: /curl/docs/cmdline-opts/proto-redir.md (revision 7628502d)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: proto-redir
5Arg: <protocols>
6Help: Enable/disable PROTOCOLS on redirect
7Added: 7.20.2
8Category: connection curl
9Multi: single
10See-also:
11  - proto
12Example:
13  - --proto-redir =http,https $URL
14---
15
16# `--proto-redir`
17
18Limit what protocols to allow on redirects. Protocols denied by --proto are
19not overridden by this option. See --proto for how protocols are represented.
20
21Example, allow only HTTP and HTTPS on redirect:
22
23    curl --proto-redir -all,http,https http://example.com
24
25By default curl only allows HTTP, HTTPS, FTP and FTPS on redirects
26(added in 7.65.2). Specifying *all* or *+all* enables all protocols on
27redirects, which is not good for security.
28