When unauthenticated (or with insufficient rights) client is blocked
either because blacklisted or excessive request rate, render an error
message and a relevant HTTP status for API requests, instead of an empty
response that appears broken.
<span>This search result can also be retrieved as RSS/<ahref="http://www.opensearch.org"target="_blank">opensearch</a> output.
@ -160,7 +163,17 @@ Use the RSS search result format to add static searches to your RSS reader, if y
</div>
</div>
::
<p>Searching the web with this peer is disabled for unauthorized users. Please <ahref="Status.html?login=">log in</a> as administrator to use the search function</p>
<pclass="alert alert-danger"role="alert">Searching the web with this peer is disabled for unauthorized users. Please <ahref="Status.html?login=">log in</a> as administrator to use the search function</p>
"You have reached the maximum allowed number of accesses to this search service within "
+timePeriodMsg+". Please try again later or log in as administrator or as a user with extended search right.",
429);
}
}
}
if(!block){
if(block){
prop.put("num-results",5);
}else{
Stringurlmask=(post==null)?".*":post.get("urlmaskfilter",".*");// the expression must be a subset of the java Match syntax described in http://lucene.apache.org/core/4_4_0/core/org/apache/lucene/util/automaton/RegExp.html