xmlrpc.cfg 616 B

123456789101112131415161718192021222324252627
  1. # XMLRPC routing
  2. route[XMLRPC] {
  3. # allow XMLRPC from localhost
  4. if ((method=="POST" || method=="GET")
  5. #!ifdef XMLRPC_WHITELIST_1
  6. && ((src_ip == XMLRPC_WHITELIST_1)
  7. #!ifdef XMLRPC_WHITELIST_2
  8. || (src_ip == XMLRPC_WHITELIST_2)
  9. #!endif
  10. #!ifdef XMLRPC_WHITELIST_3
  11. || (src_ip == XMLRPC_WHITELIST_3)
  12. #!endif
  13. )
  14. #!endif
  15. ) {
  16. # close connection only for xmlrpclib user agents (there is a bug in
  17. # xmlrpclib: it waits for EOF before interpreting the response).
  18. if ($hdr(User-Agent) =~ "xmlrpclib")
  19. set_reply_close();
  20. set_reply_no_connect();
  21. dispatch_rpc();
  22. exit;
  23. }
  24. send_reply("403", "Forbidden");
  25. exit;
  26. }