xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. |
| 2 | SPDX-License-Identifier: curl |
| 3 | Long: proto-redir |
| 4 | Arg: <protocols> |
| 5 | Help: Enable/disable PROTOCOLS on redirect |
| 6 | Added: 7.20.2 |
| 7 | Category: connection curl |
| 8 | Example: --proto-redir =http,https $URL |
| 9 | See-also: proto |
| 10 | Multi: single |
| 11 | --- |
| 12 | Tells curl to limit what protocols it may use on redirect. Protocols denied by |
| 13 | --proto are not overridden by this option. See --proto for how protocols are |
| 14 | represented. |
| 15 | |
| 16 | Example, allow only HTTP and HTTPS on redirect: |
| 17 | |
| 18 | curl --proto-redir -all,http,https http://example.com |
| 19 | |
| 20 | By default curl will only allow HTTP, HTTPS, FTP and FTPS on redirect (since |
| 21 | 7.65.2). Specifying *all* or *+all* enables all protocols on redirects, which |
| 22 | is not good for security. |