... when the client is using https and https inspection is enabled.
Fixes the trust mechanism for https requests.
Reported by Laurent Caumont in #1767.
}
}
- if (NULL == (referer = get_header_value(csp->headers, "Referer:")))
+#ifdef FEATURE_HTTPS_INSPECTION
+ if (client_use_ssl(csp))
{
- /* no referrer was supplied */
- return 1;
+ if (NULL == (referer = get_header_value(csp->https_headers, "Referer:")))
+ {
+ /* no referrer was supplied */
+ return 1;
+ }
+ }
+ else
+#endif
+ {
+ if (NULL == (referer = get_header_value(csp->headers, "Referer:")))
+ {
+ /* no referrer was supplied */
+ return 1;
+ }
}
-
/*
* If not, do we maybe trust its referrer?