static void apiServerZoneAxfrRetrieve(HttpRequest* req, HttpResponse* resp) {
DNSName zonename = apiZoneIdToName(req->parameters["id"]);
- if(req->method != "PUT")
+ if(req->method != "PUT" || ::arg().mustDo("api-readonly"))
throw HttpMethodNotAllowedException();
UeberBackend B;
static void apiServerZoneNotify(HttpRequest* req, HttpResponse* resp) {
DNSName zonename = apiZoneIdToName(req->parameters["id"]);
- if(req->method != "PUT")
+ if(req->method != "PUT" || ::arg().mustDo("api-readonly"))
throw HttpMethodNotAllowedException();
UeberBackend B;
}
void apiServerCacheFlush(HttpRequest* req, HttpResponse* resp) {
- if(req->method != "PUT")
+ if(req->method != "PUT" || ::arg().mustDo("api-readonly"))
throw HttpMethodNotAllowedException();
DNSName canon = apiNameToDNSName(req->getvars["domain"]);