doc.push_back(makeJSONTSIGKey(key, false));
}
resp->setBody(doc);
- } else if (req->method == "POST" && !::arg().mustDo("api-readonly")) {
+ } else if (req->method == "POST") {
auto document = req->json();
DNSName keyname(stringFromJson(document, "name"));
DNSName algo(stringFromJson(document, "algorithm"));
if (req->method == "GET") {
resp->setBody(makeJSONTSIGKey(tsk));
- } else if (req->method == "PUT" && !::arg().mustDo("api-readonly")) {
+ } else if (req->method == "PUT") {
json11::Json document;
if (!req->body.empty()) {
document = req->json();
}
}
resp->setBody(makeJSONTSIGKey(tsk));
- } else if (req->method == "DELETE" && !::arg().mustDo("api-readonly")) {
+ } else if (req->method == "DELETE") {
if (!B.deleteTSIGKey(keyname)) {
throw HttpInternalServerErrorException("Unable to remove TSIG key '" + keyname.toStringNoDot() + "'");
} else {