Project

api_valve

0.01
No release in over a year
Lightweight ruby/rack API reverse proxy or gateway
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.1
~> 2.0
~> 3.7
~> 0.16
~> 0.9
~> 3.4
= 1.37.1
>= 0

Runtime

>= 6.1, < 7.1
>= 2, < 4
>= 0.14, < 2.7
>= 2.0
 Project Readme

ApiValve

Gem Version Depfu

Extensible rack application that serves as lightweight API reverse proxy.

Installation

Just add the gem to your Gemfile

gem 'api_valve'

Usage

See the examples section on how to create & configure your own proxy using this gem.

Headers

By default the following headers are forwarded:

  • Accept
  • Content-Type
  • User-Agent
  • X-Real-IP
  • X-Request-Id

Additionally these headers are generated:

  • X-Forwarded-For: The ApiGateway is added to the list
  • X-Forwarded-Host: Filled with original request host
  • X-Forwarded-Port: Filled with original request port
  • X-Forwarded-Prefix: Filled with the path prefix of the forwarder within the Api Gateway (eg SCRIPT_NAME env)
  • X-Forwarded-Proto: Filled with original request scheme