Skip to content

danielfarrell/goliath-reverse-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goliath-reverse-proxy

Goliath reverse proxy middleware. Forwards all requests to another server.

Dependencies

All the work is done by em-http-request, em-syncrony, and goliath.

Install

gem install goliath-reverse-proxy

or add to your Gemfile

gem 'goliath-reverse-proxy'

Example

require 'goliath'
require 'goliath/rack/reverse_proxy'

class Proxy < Goliath::API
  # Include other middleware here before the proxy
  # Params is required to pass along data
  use Goliath::Rack::Params
  use Goliath::Rack::ReverseProxy, base_url: 'http://127.0.0.1:8000'

  def response(env)
    [200, {}, []]
  end
end

About

A reverse proxy middleware for Goliath

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages