Verified Commit cbbde6a1 authored by Thomas Rientjes's avatar Thomas Rientjes
Browse files

Improve candidate validation logic

parent 444aedaa
......@@ -73,6 +73,12 @@ exports.isValidCandidate = function (httpChannel) {
var initiatorDomain;
// See if the request uses a supported URI scheme.
if (!httpChannel.URI.schemeIs('http') &&
!httpChannel.URI.schemeIs('https')) {
return false;
}
// See if the request is targeted at a Content Delivery Network.
if (mappings[httpChannel.URI.host] === undefined) {
return false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment