- ``backupSelector``: used to pick the IP address from list of all candidates if all addresses are down. Choices include 'pickclosest', 'random', 'hashed', 'all' (default to 'random').
- ``source``: Source IP address to check from
- ``stringmatch``: check ``url`` for this string, only declare 'up' if found
+ - ``useragent``: Set the HTTP "User-Agent" header in the requests. By default it is set to "PowerDNS Authoritative Server/" plus the version number
An example of IP address sets:
+#include "version.hh"
#include "ext/luawrapper/include/LuaContext.hpp"
#include "lua-auth4.hh"
#include <thread>
setDown(rem, url, opts);
for(bool first=true;;first=false) {
try {
- MiniCurl mc;
+ string useragent = productName() + "/" + getPDNSVersion();
+ if (opts.count("useragent")) {
+ useragent = opts.at("useragent");
+ }
+ MiniCurl mc(useragent);
string content;
if(opts.count("source")) {