Class: TWProxy

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/twproxy/proxy.rb

Instance Method Summary collapse

Instance Method Details

#get_uriObject

Wiki proxy



72
73
74
75
76
77
78
79
80
# File 'lib/twproxy/proxy.rb', line 72

def get_uri
  capture = URI::decode(params[:captures][0])
  base = settings.url
  if settings.url[-1] != '/'
    base += '/'
  end

  uri = URI.parse("#{base}#{URI::encode(capture)}")
end