From a6014cae157107ec868816fcccf8689a5d6cc766 Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Sun, 22 Apr 2018 02:25:43 +0000 Subject: HSTS: support policy in urldb --- content/urldb.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'content/urldb.h') diff --git a/content/urldb.h b/content/urldb.h index 4aa548704..0ad64267f 100644 --- a/content/urldb.h +++ b/content/urldb.h @@ -131,4 +131,22 @@ bool urldb_set_cookie(const char *header, struct nsurl *url, struct nsurl *refer char *urldb_get_cookie(struct nsurl *url, bool include_http_only); +/** + * Set HSTS policy for an URL + * + * \param url URL being fetched + * \param header Strict-Transport-Security header value + * \return true on success, false otherwise + */ +bool urldb_set_hsts_policy(struct nsurl *url, const char *header); + + +/** + * Determine if HSTS policy is enabled for an URL + * + * \param url URL being fetched + * \return true if HSTS policy is enabled, false otherwise + */ +bool urldb_get_hsts_enabled(struct nsurl *url); + #endif -- cgit v1.2.3