Created
October 18, 2012 07:50
-
-
Save babatakao/3910333 to your computer and use it in GitHub Desktop.
SinatraでWEBrickのDNS逆引きを抑制するサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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