趣旨 WEBrick で Basic 認証を行ってみる。 #!/usr/local/bin/ruby require 'webrick' include WEBrick mime_types = HTTPUtils::DefaultMimeTypes mime_types['rhtml'] = 'text/html' server = HTTPServer.new( :Port => 2000, :MimeTypes => mime_types, :DocumentRoot => File.expand_path(File.dirname(".")) + "/htdocs", :RequestCallback => lambda do |req, res| if req.path =~ %r(^/private/) HTTPAuth.basic_auth(req, res, "my rea