Sha256: 4e65d0e775175faa6f7bbcbd11606143ae88f09c605d8048090095538756084e

Contents?: true

Size: 535 Bytes

Versions: 2

Compression:

Stored size: 535 Bytes

Contents

require 'ronin/web/server/base'

class FTPApp < Ronin::Web::Server::Base

  get '/file' do
    'FTP File'
  end

end

class WWWApp < Ronin::Web::Server::Base

  get '/file' do
    'WWW File'
  end

end

class HostsApp < Ronin::Web::Server::Base

  get '/tests/for_host' do
    for_host('localhost') do
      'Admin Response'
    end

    for_host(/downloads/) do
      'Download Response'
    end

    'Generic Response'
  end

  host 'example.com', WWWApp
  hosts_like /^ftp\./, FTPApp

  get '/file' do
    'Generic File'
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ronin-web-0.2.1 spec/web/server/classes/hosts_app.rb
ronin-web-0.2.0 spec/web/server/classes/hosts_app.rb