+bool parse_gen204(const ConfigLine &line, Config *config)
+{
+ if (line.arguments.size() != 1) {
+ log(ERROR, "'gen204' takes exactly one argument");
+ return false;
+ }
+
+ Gen204Config gen204;
+ gen204.url = line.arguments[0];
+
+ // Parse the CORS origin, if it exists.
+ map<string, string>::const_iterator allow_origin_it = line.parameters.find("allow_origin");
+ if (allow_origin_it != line.parameters.end()) {
+ gen204.allow_origin = allow_origin_it->second;
+ }
+
+ config->pings.push_back(gen204);
+ return true;
+}
+