summaryrefslogtreecommitdiff
path: root/src/cache.c
diff options
context:
space:
mode:
authorcorvid <devnull@localhost>2015-06-29 16:29:28 +0000
committercorvid <devnull@localhost>2015-06-29 16:29:28 +0000
commit476caeec459ecdee0b4e56f77ce46f76dfbfc817 (patch)
tree85e965abe35b8e3c4b96fe3dfe1c69635cf695eb /src/cache.c
parent41f2b84001bb63d705c7981492a9637d4d48f5f7 (diff)
prefs.http_strict_transport_security
Diffstat (limited to 'src/cache.c')
-rw-r--r--src/cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cache.c b/src/cache.c
index cc33db9c..b082ef89 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -722,7 +722,8 @@ static void Cache_parse_header(CacheEntry_t *entry)
dFree(connection);
}
- if (!dStrAsciiCasecmp(URL_SCHEME(entry->Url), "https") &&
+ if (prefs.http_strict_transport_security &&
+ !dStrAsciiCasecmp(URL_SCHEME(entry->Url), "https") &&
!a_Url_host_is_ip(URL_HOST(entry->Url)) &&
(hsts = Cache_parse_field(header, "Strict-Transport-Security"))) {
a_Hsts_set(hsts, entry->Url);