Just did it, and it was surprisingly simple:
Gemfile:
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rack'
gem 'rack-rewrite'
config.ru:
require 'rack/rewrite'
use Rack::Rewrite do
...
end
run lambda { |env| [200, {'Content-Type'=>'text/plain'}, StringIO.new("Nothing Here!\n")] }
Anything that does not meet your forwarding rules will simply return 200 with the text "Nothing Here!"
source
share