123456789101112131415161718192021222324252627 |
- # XMLRPC routing
- route[XMLRPC] {
- # allow XMLRPC from localhost
- if ((method=="POST" || method=="GET")
- #!ifdef XMLRPC_WHITELIST_1
- && ((src_ip == XMLRPC_WHITELIST_1)
- #!ifdef XMLRPC_WHITELIST_2
- || (src_ip == XMLRPC_WHITELIST_2)
- #!endif
- #!ifdef XMLRPC_WHITELIST_3
- || (src_ip == XMLRPC_WHITELIST_3)
- #!endif
- )
- #!endif
- ) {
- # close connection only for xmlrpclib user agents (there is a bug in
- # xmlrpclib: it waits for EOF before interpreting the response).
- if ($hdr(User-Agent) =~ "xmlrpclib")
- set_reply_close();
- set_reply_no_connect();
- dispatch_rpc();
- exit;
- }
- send_reply("403", "Forbidden");
- exit;
- }
|