xref: /aosp_15_r20/external/curl/docs/cmdline-opts/referer.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: referer
5*6236dae4SAndroid Build Coastguard WorkerShort: e
6*6236dae4SAndroid Build Coastguard WorkerArg: <URL>
7*6236dae4SAndroid Build Coastguard WorkerProtocols: HTTP
8*6236dae4SAndroid Build Coastguard WorkerHelp: Referrer URL
9*6236dae4SAndroid Build Coastguard WorkerCategory: http
10*6236dae4SAndroid Build Coastguard WorkerAdded: 4.0
11*6236dae4SAndroid Build Coastguard WorkerMulti: single
12*6236dae4SAndroid Build Coastguard WorkerSee-also:
13*6236dae4SAndroid Build Coastguard Worker  - user-agent
14*6236dae4SAndroid Build Coastguard Worker  - header
15*6236dae4SAndroid Build Coastguard WorkerExample:
16*6236dae4SAndroid Build Coastguard Worker  - --referer "https://fake.example" $URL
17*6236dae4SAndroid Build Coastguard Worker  - --referer "https://fake.example;auto" -L $URL
18*6236dae4SAndroid Build Coastguard Worker  - --referer ";auto" -L $URL
19*6236dae4SAndroid Build Coastguard Worker---
20*6236dae4SAndroid Build Coastguard Worker
21*6236dae4SAndroid Build Coastguard Worker# `--referer`
22*6236dae4SAndroid Build Coastguard Worker
23*6236dae4SAndroid Build Coastguard WorkerSet the referrer URL in the HTTP request. This can also be set with the
24*6236dae4SAndroid Build Coastguard Worker--header flag of course. When used with --location you can append `;auto`" to
25*6236dae4SAndroid Build Coastguard Workerthe --referer URL to make curl automatically set the previous URL when it
26*6236dae4SAndroid Build Coastguard Workerfollows a Location: header. The `;auto` string can be used alone, even if you
27*6236dae4SAndroid Build Coastguard Workerdo not set an initial --referer.
28