• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: hsts
5Arg: <file name>
6Protocols: HTTPS
7Help: Enable HSTS with this cache file
8Added: 7.74.0
9Category: http
10Multi: append
11See-also:
12  - proto
13Example:
14  - --hsts cache.txt $URL
15---
16
17# `--hsts`
18
19This option enables HSTS for the transfer. If the file name points to an
20existing HSTS cache file, that is used. After a completed transfer, the
21cache is saved to the file name again if it has been modified.
22
23If curl is told to use HTTP:// for a transfer involving a host name that
24exists in the HSTS cache, it upgrades the transfer to use HTTPS. Each HSTS
25cache entry has an individual life time after which the upgrade is no longer
26performed.
27
28Specify a "" file name (zero length) to avoid loading/saving and make curl
29just handle HSTS in memory.
30
31If this option is used several times, curl loads contents from all the
32files but the last one is used for saving.
33