#!/usr/bin/env ruby # This is the AutoResponse rule config file # using ruby syntax # Examples: # if you want to respond all requests with url # equals "http://www.1688.com" with "Hello world!" : url "http://www.1688.com" r "Hello world" # or you can respond with Array url "http://china.alibaba.com" r [200, {}, "Got replaced"] #[status, header, body] # if you want to respond these requests with a file: url "http://www.yousite.com" goto "/home/youruser/somefile.txt" # on Windows: url "http://www.another-site.com" goto "C:/Program\ Files/proj/test.txt" # if you want to respond with another remote url: url "http://www.targetsite.com" goto "http://www.real-request-target.com/test.html" # you can set response headers in the returned string # e.g. url "http://www.target-site.com/target-url" r <<-RESP Test-Msg : http-header-example header-server : Auto-Responder Content-Type : text/html; charset=utf-8