xref: /aosp_15_r20/external/curl/docs/cmdline-opts/location-trusted.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerLong: location-trusted
5*6236dae4SAndroid Build Coastguard WorkerHelp: As --location, but send secrets to other hosts
6*6236dae4SAndroid Build Coastguard WorkerProtocols: HTTP
7*6236dae4SAndroid Build Coastguard WorkerCategory: http auth
8*6236dae4SAndroid Build Coastguard WorkerAdded: 7.10.4
9*6236dae4SAndroid Build Coastguard WorkerMulti: boolean
10*6236dae4SAndroid Build Coastguard WorkerSee-also:
11*6236dae4SAndroid Build Coastguard Worker  - user
12*6236dae4SAndroid Build Coastguard WorkerExample:
13*6236dae4SAndroid Build Coastguard Worker  - --location-trusted -u user:password $URL
14*6236dae4SAndroid Build Coastguard Worker  - --location-trusted -H "Cookie: session=abc" $URL
15*6236dae4SAndroid Build Coastguard Worker---
16*6236dae4SAndroid Build Coastguard Worker
17*6236dae4SAndroid Build Coastguard Worker# `--location-trusted`
18*6236dae4SAndroid Build Coastguard Worker
19*6236dae4SAndroid Build Coastguard WorkerInstructs curl to like --location follow HTTP redirects, but permits it to
20*6236dae4SAndroid Build Coastguard Workersend credentials and other secrets along to other hosts than the initial one.
21*6236dae4SAndroid Build Coastguard Worker
22*6236dae4SAndroid Build Coastguard WorkerThis may or may not introduce a security breach if the site redirects you to a
23*6236dae4SAndroid Build Coastguard Workersite to which you send this sensitive data to. Another host means that one or
24*6236dae4SAndroid Build Coastguard Workermore of hostname, protocol scheme or port number changed.
25*6236dae4SAndroid Build Coastguard Worker
26*6236dae4SAndroid Build Coastguard WorkerThis option also allows curl to pass long cookies set explicitly with --header.
27