Skip to content

Instantly share code, notes, and snippets.

@babatakao
Created October 18, 2012 07:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save babatakao/3910333 to your computer and use it in GitHub Desktop.
Save babatakao/3910333 to your computer and use it in GitHub Desktop.
SinatraでWEBrickのDNS逆引きを抑制するサンプル
require 'sinatra'
class Rack::Handler::WEBrick
class << self
alias_method :run_original, :run
end
def self.run(app, options={})
options[:DoNotReverseLookup] = true
run_original(app, options)
end
end
get '/' do
"hello, world"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment