anchor.diff:              reply_json(Req, [list_to_binary("Unexpected server error, request logged.")], 500)
       end.
   
  -is_throttled_request(["internalSettings"]) ->
  +is_throttled_request(["internalSettings"], _Plugins) ->
       false;
  -is_throttled_request(["diag" | _]) ->
  +is_throttled_request(["diag" | _], _Plugins) ->
       false;
  -is_throttled_request(["couchBase" | _]) ->      % this get's throttled as capi request
  +is_throttled_request(["couchBase" | _], _Plugins) ->      % this get's throttled as capi request
       false;
   %% this gets throttled via capi too
  -is_throttled_request(["pools", _, "buckets", _BucketId, "docs"]) ->
  +is_throttled_request(["pools", _, "buckets", _BucketId, "docs"], _Plugins) ->
       false;
  -is_throttled_request(_) ->
  +is_throttled_request([RestPrefix | _], Plugins) ->
  +    %% Requests for pluggable UI is not throttled here.
  +    %% If necessary it is done in the service node.
  +    not menelaus_pluggable_ui:is_plugin(RestPrefix, Plugins);
  +is_throttled_request(_, _Plugins) ->
       true.
   
  -loop_inner(Req, AppRoot, Path, PathTokens) ->
  +loop_inner(Req, {AppRoot, Plugins}, Path, PathTokens) ->
       menelaus_auth:validate_request(Req),
       Action = case Req:get(method) of
                    Method when Method =:= 'GET'; Method =:= 'HEAD' ->
  
positive.code:                          ["couchBase" | _] -> {auth, fun capi_http_proxy:handle_request/1};
                           ["_metakv" | _] ->
                               {auth, fun menelaus_metakv:handle_delete/2, [Path]};
                           _ ->
                               ?MENELAUS_WEB_LOG(0002, "Invalid delete received: ~p as ~p", [Req, PathTokens]),
                               {done, reply_text(Req, "Method Not Allowed", 405)}
                       end;
                   'PUT' = Method ->
                       case PathTokens of
  
negative.code:                                  ns_audit_cfg:set_global(Values),
                                   reply(Req, 200)
                           end, Req, validate_settings_audit(Args)).
  
  nth_path_tail(Path, N) when N > 0 ->
      nth_path_tail(path_tail(Path), N-1);
  nth_path_tail(Path, 0) ->
      Path.
  
  path_tail([$/|[$/|_] = Path]) ->
      path_tail(Path);
  path_tail([$/|Path]) ->
      Path;
  path_tail([_|Rest]) ->
      path_tail(Rest).
  
  drop_rest_prefix(Path) ->
      [$/ | path_tail(Path)].
  