2024-05-15 15:20:32 -04:00
|
|
|
---
|
2023-12-11 20:30:44 -05:00
|
|
|
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
|
|
SPDX-License-Identifier: curl
|
|
|
|
Long: proto-redir
|
|
|
|
Arg: <protocols>
|
|
|
|
Help: Enable/disable PROTOCOLS on redirect
|
|
|
|
Added: 7.20.2
|
|
|
|
Category: connection curl
|
|
|
|
Multi: single
|
2024-05-15 15:20:32 -04:00
|
|
|
See-also:
|
|
|
|
- proto
|
|
|
|
Example:
|
|
|
|
- --proto-redir =http,https $URL
|
2023-12-11 20:30:44 -05:00
|
|
|
---
|
2024-05-15 15:20:32 -04:00
|
|
|
|
|
|
|
# `--proto-redir`
|
|
|
|
|
|
|
|
Limit what protocols to allow on redirects. Protocols denied by --proto are
|
|
|
|
not overridden by this option. See --proto for how protocols are represented.
|
2023-12-11 20:30:44 -05:00
|
|
|
|
|
|
|
Example, allow only HTTP and HTTPS on redirect:
|
|
|
|
|
2024-05-15 15:20:32 -04:00
|
|
|
curl --proto-redir -all,http,https http://example.com
|
2023-12-11 20:30:44 -05:00
|
|
|
|
|
|
|
By default curl only allows HTTP, HTTPS, FTP and FTPS on redirects (added in
|
|
|
|
7.65.2). Specifying *all* or *+all* enables all protocols on redirects, which
|
|
|
|
is not good for security.
|